summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-18 14:25:54 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-18 15:17:25 -0400
commit662bdfbeb12883944075d3e038ea58af45f3df3a (patch)
treedf52da38effddc771901b2e1247e27dfebc202cf
parentd5c7b62b8ec2e80829746147e0fa65935120231d (diff)
downloadgitlab-ce-662bdfbeb12883944075d3e038ea58af45f3df3a.tar.gz
Make StatGraph JS explicitly require its dependencies
This allows us to test them in a bit more isolation.
-rw-r--r--app/assets/javascripts/stat_graph_contributors.js.coffee4
-rw-r--r--app/assets/javascripts/stat_graph_contributors_graph.js.coffee4
-rw-r--r--spec/javascripts/stat_graph_contributors_graph_spec.js2
-rw-r--r--spec/javascripts/stat_graph_contributors_util_spec.js2
-rw-r--r--spec/javascripts/stat_graph_spec.js2
5 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/stat_graph_contributors.js.coffee b/app/assets/javascripts/stat_graph_contributors.js.coffee
index 27f0fd31d50..ed12bdcef22 100644
--- a/app/assets/javascripts/stat_graph_contributors.js.coffee
+++ b/app/assets/javascripts/stat_graph_contributors.js.coffee
@@ -1,3 +1,7 @@
+#= require d3
+#= require jquery
+#= require stat_graph_contributors_util
+
class @ContributorsStatGraph
init: (log) ->
@parsed_log = ContributorsStatGraphUtil.parse_log(log)
diff --git a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee
index 8b82d20c6c2..0e6fbdef3bc 100644
--- a/app/assets/javascripts/stat_graph_contributors_graph.js.coffee
+++ b/app/assets/javascripts/stat_graph_contributors_graph.js.coffee
@@ -1,3 +1,7 @@
+#= require d3
+#= require jquery
+#= require underscore
+
class @ContributorsGraph
MARGIN:
top: 20
diff --git a/spec/javascripts/stat_graph_contributors_graph_spec.js b/spec/javascripts/stat_graph_contributors_graph_spec.js
index 1090cb7f620..78d39f1b428 100644
--- a/spec/javascripts/stat_graph_contributors_graph_spec.js
+++ b/spec/javascripts/stat_graph_contributors_graph_spec.js
@@ -1,3 +1,5 @@
+//= require stat_graph_contributors_graph
+
describe("ContributorsGraph", function () {
describe("#set_x_domain", function () {
it("set the x_domain", function () {
diff --git a/spec/javascripts/stat_graph_contributors_util_spec.js b/spec/javascripts/stat_graph_contributors_util_spec.js
index 9c1b588861d..ee90892eb48 100644
--- a/spec/javascripts/stat_graph_contributors_util_spec.js
+++ b/spec/javascripts/stat_graph_contributors_util_spec.js
@@ -1,3 +1,5 @@
+//= require stat_graph_contributors_util
+
describe("ContributorsStatGraphUtil", function () {
describe("#parse_log", function () {
diff --git a/spec/javascripts/stat_graph_spec.js b/spec/javascripts/stat_graph_spec.js
index b589af34610..4c652910cd6 100644
--- a/spec/javascripts/stat_graph_spec.js
+++ b/spec/javascripts/stat_graph_spec.js
@@ -1,3 +1,5 @@
+//= require stat_graph
+
describe("StatGraph", function () {
describe("#get_log", function () {