mingle-macro-development-toolkit 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
|
|
1
1
|
#Copyright 2007 - 2013 ThoughtWorks, Inc. All rights reserved.
|
2
2
|
|
3
|
+
Dir.glob(File.join(File.dirname(__FILE__), "loaders", "**/base.rb")).each do |file|
|
4
|
+
require file
|
5
|
+
end
|
6
|
+
|
3
7
|
Dir.glob(File.join(File.dirname(__FILE__), "loaders", "**/*.rb")).each do |file|
|
4
8
|
require file
|
5
9
|
end
|
Binary file
|
@@ -5,7 +5,6 @@ require File.join(File.dirname(__FILE__), 'integration_test_helper')
|
|
5
5
|
class RestLoaderTest < Test::Unit::TestCase
|
6
6
|
|
7
7
|
TEST_PROJECT = 'http://admin:p@localhost:8080/api/v2/lightweight_projects/macro_toolkit_test.xml'
|
8
|
-
TEST_PROJECT_V1 = "http://admin:p@localhost:8080/api/v1/lightweight_projects/macro_toolkit_test.xml"
|
9
8
|
|
10
9
|
def test_should_load_direct_project_attributes_from_correct_fixture
|
11
10
|
assert_not_nil project(TEST_PROJECT)
|
@@ -56,37 +55,18 @@ class RestLoaderTest < Test::Unit::TestCase
|
|
56
55
|
assert_equal 97, mql_results.first['sum_story_points'].to_i
|
57
56
|
end
|
58
57
|
|
59
|
-
def test_should_execute_mql_to_return_an_array_of_hash_results_for_each_result_row_for_v1
|
60
|
-
mql_results = project(TEST_PROJECT_V1).execute_mql("SELECT SUM('story points') WHERE 'Release' = (Current Release) AND 'Date Created' IS NOT NULL")
|
61
|
-
assert_equal 1, mql_results.size
|
62
|
-
assert_equal Hash, mql_results.first.class
|
63
|
-
assert_equal 97, mql_results.first['Sum_Story_Points'].to_i
|
64
|
-
end
|
65
|
-
|
66
58
|
def test_should_execute_number_format_remotely_for_v2
|
67
59
|
proj = project(TEST_PROJECT)
|
68
60
|
assert_equal "3.67", proj.format_number_with_project_precision("3.6711").to_s
|
69
61
|
assert_equal "20.14", proj.format_number_with_project_precision("20.1398").to_s
|
70
62
|
end
|
71
63
|
|
72
|
-
def test_should_execute_number_format_remotely_for_v1
|
73
|
-
proj = project(TEST_PROJECT_V1)
|
74
|
-
assert_equal "3.67", proj.format_number_with_project_precision("3.6711").to_s
|
75
|
-
assert_equal "20.14", proj.format_number_with_project_precision("20.1398").to_s
|
76
|
-
end
|
77
|
-
|
78
64
|
def test_should_execute_date_format_remotely_for_v2
|
79
65
|
proj = project(TEST_PROJECT)
|
80
66
|
assert_equal "22 May 2005", proj.format_date_with_project_date_format(Date.new(2005, 5, 22))
|
81
67
|
assert_equal "06 Oct 2008", proj.format_date_with_project_date_format(Date.new(2008, 10, 6))
|
82
68
|
end
|
83
69
|
|
84
|
-
def test_should_execute_date_format_remotely_for_v1
|
85
|
-
proj = project(TEST_PROJECT_V1)
|
86
|
-
assert_equal "22 May 2005", proj.format_date_with_project_date_format(Date.new(2005, 5, 22))
|
87
|
-
assert_equal "06 Oct 2008", proj.format_date_with_project_date_format(Date.new(2008, 10, 6))
|
88
|
-
end
|
89
|
-
|
90
70
|
def test_should_errors_in_executing_mql_should_be_available_in_the_test
|
91
71
|
project = project(TEST_PROJECT)
|
92
72
|
mql_results = project.execute_mql("SELECT 'Invalid Property Name'")
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingle-macro-development-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- ThoughtWorks Inc
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-
|
18
|
+
date: 2013-05-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: mingle_macro_models
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/mingle_macro_development_toolkit/loaders.rb
|
84
84
|
- lib/mingle_macro_development_toolkit.rb
|
85
85
|
- LICENSE
|
86
|
+
- mingle-macro-development-toolkit-2.0.1.gem
|
86
87
|
- Rakefile
|
87
88
|
- README
|
88
89
|
- templates/getting_started.txt
|