framework_identificator 1.4.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -8
- data/lib/framework_identificator.rb +13 -9
- data/lib/framework_identificator/testing_frameworks/cucumber.rb +27 -0
- data/lib/framework_identificator/version.rb +1 -1
- data/spec/framework_identificator/application_frameworks/rails_spec.rb +33 -33
- data/spec/framework_identificator/testing_frameworks/cucumber_spec.rb +43 -0
- data/spec/framework_identificator/testing_frameworks/rspec_spec.rb +9 -6
- data/spec/framework_identificator/testing_frameworks_spec.rb +5 -2
- data/spec/framework_identificator_spec.rb +7 -7
- metadata +7 -4
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# FrameworkIdentificator [![Build Status](https://secure.travis-ci.org/zedtux/framework_identificator.png)](http://travis-ci.org/zedtux/framework_identificator) [![Dependency Status](https://gemnasium.com/zedtux/framework_identificator.png)](http://gemnasium.com/zedtux/framework_identificator) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/zedtux/framework_identificator) [![endorse](http://api.coderwall.com/zedtux/endorsecount.png)](http://coderwall.com/zedtux)
|
2
2
|
|
3
|
-
Identify the used
|
3
|
+
Identify the used application or testing frameworks in a given project.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,17 +18,22 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
### With a
|
21
|
+
### With a String object (project doesn't have tests (Berk))
|
22
|
+
|
23
|
+
FrameworkIdentificator.from(File.join("projects", "my_project"))
|
24
|
+
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[]}
|
25
|
+
|
26
|
+
### With a Pathname object (project use Rspec for unit test)
|
22
27
|
|
23
28
|
require "pathname"
|
24
29
|
FrameworkIdentificator.from(Pathname.new(File.join("projects", "my_project")))
|
25
|
-
=>
|
30
|
+
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[#<FrameworkIdentificator::TestingFrameworks::Rspec:0x007fd7ec3be3b0>]}
|
26
31
|
|
27
|
-
### With a Git object
|
32
|
+
### With a Git object (project use Rspec and Cucumber frameworks)
|
28
33
|
|
29
34
|
require "git"
|
30
35
|
FrameworkIdentificator.from(Git.clone("git@myhost.tld:my_project", "my_project"))
|
31
|
-
=>
|
36
|
+
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3aff30 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[#<FrameworkIdentificator::TestingFrameworks::Cucumber:0x007fd7ec3be680>, #<FrameworkIdentificator::TestingFrameworks::Rspec:0x007fd7ec3be3b0>]}
|
32
37
|
|
33
38
|
## Implemented
|
34
39
|
|
@@ -38,7 +43,9 @@ Or install it yourself as:
|
|
38
43
|
|
39
44
|
### Frameworks
|
40
45
|
|
41
|
-
|
46
|
+
| | RSpec | Cucumber |
|
47
|
+
| ----- | ----- | -------- |
|
48
|
+
| Rails | √ | √ |
|
42
49
|
|
43
50
|
## Contributing
|
44
51
|
|
@@ -55,6 +62,6 @@ You can contribute to this gem by adding support for new [VCS](http://en.wikiped
|
|
55
62
|
### New framework
|
56
63
|
|
57
64
|
This gem is built in order to allow easy contributions.
|
58
|
-
To add a new framework, just add the new class in the `lib/framework_identificator/
|
65
|
+
To add a new framework, just add the new class in the `lib/framework_identificator/application_frameworks/` that implement the method `self.recognized?(source)`.
|
59
66
|
|
60
|
-
Have a look at the [Rails framework class](/zedtux/framework_identificator/blob/master/lib/framework_identificator/
|
67
|
+
Have a look at the [Rails framework class](/zedtux/framework_identificator/blob/master/lib/framework_identificator/application_frameworks/rails.rb).
|
@@ -9,21 +9,25 @@ require "framework_identificator/testing_frameworks"
|
|
9
9
|
end
|
10
10
|
|
11
11
|
module FrameworkIdentificator
|
12
|
-
def self.from(source
|
12
|
+
def self.from(source)
|
13
13
|
raise ArgumentError unless ["String", "Pathname", "Git::Base"].include?(source.class.name)
|
14
14
|
|
15
15
|
# Use source itself if Pathname otherwise fetch the Git dir path
|
16
16
|
source = source.class.name == "Git::Base" ? source.dir.path : source
|
17
17
|
raise ArgumentError if source == ""
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
frameworks = {application: nil, testing: []}
|
20
|
+
|
21
|
+
# Try to detect an application framework using the source
|
22
|
+
FrameworkIdentificator::ApplicationFrameworks.available.detect do |framework|
|
23
|
+
frameworks[:application] = framework.new(source) if framework.recognized?(source)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Try to detect a testing framework using the source
|
27
|
+
FrameworkIdentificator::TestingFrameworks.available.each do |framework|
|
28
|
+
frameworks[:testing] << framework.new(source) if framework.recognized?(source)
|
27
29
|
end
|
30
|
+
|
31
|
+
frameworks
|
28
32
|
end
|
29
33
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module FrameworkIdentificator
|
2
|
+
module TestingFrameworks
|
3
|
+
class Cucumber
|
4
|
+
# ~~~~ Attributes ~~~~
|
5
|
+
attr_accessor :source
|
6
|
+
|
7
|
+
# ~~~~ Class Methods ~~~~
|
8
|
+
def self.recognized?(source)
|
9
|
+
@source = source
|
10
|
+
|
11
|
+
self.has_features_env_file?
|
12
|
+
end
|
13
|
+
|
14
|
+
# ~~~~ Instance Methods ~~~~
|
15
|
+
def initialize(*source)
|
16
|
+
# Nothing do initialize for now
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def self.has_features_env_file?
|
22
|
+
File.exists?(File.join(@source, "features", "support", "env.rb"))
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -31,13 +31,13 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
31
31
|
before do
|
32
32
|
FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true)
|
33
33
|
FrameworkIdentificator::ApplicationFrameworks::Rails.any_instance.stub(:parse_source).and_return(true)
|
34
|
-
@framework = FrameworkIdentificator.from(@repository_path
|
34
|
+
@framework = FrameworkIdentificator.from(@repository_path)
|
35
35
|
end
|
36
36
|
it "should return not return a nil" do
|
37
37
|
@framework.should_not be_nil
|
38
38
|
end
|
39
|
-
it "should return an instance of ApplicationFrameworks::Rails" do
|
40
|
-
@framework.class.should be FrameworkIdentificator::ApplicationFrameworks::Rails
|
39
|
+
it "should return an instance of FrameworkIdentificator::ApplicationFrameworks::Rails" do
|
40
|
+
@framework[:application].class.should be FrameworkIdentificator::ApplicationFrameworks::Rails
|
41
41
|
end
|
42
42
|
describe "instance" do
|
43
43
|
describe "project_name" do
|
@@ -55,8 +55,8 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
55
55
|
end
|
56
56
|
context "without Rakefile" do
|
57
57
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
58
|
-
it "should return
|
59
|
-
FrameworkIdentificator.from(@repository_path
|
58
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
59
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -64,14 +64,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
64
64
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
|
65
65
|
context "with a Rakefile" do
|
66
66
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
67
|
-
it "should return
|
68
|
-
FrameworkIdentificator.from(@repository_path
|
67
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
68
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
69
69
|
end
|
70
70
|
end
|
71
71
|
context "without Rakefile" do
|
72
72
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
73
|
-
it "should return
|
74
|
-
FrameworkIdentificator.from(@repository_path
|
73
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
74
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -82,14 +82,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
82
82
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
|
83
83
|
context "with a Rakefile" do
|
84
84
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
85
|
-
it "should return
|
86
|
-
FrameworkIdentificator.from(@repository_path
|
85
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
86
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
87
87
|
end
|
88
88
|
end
|
89
89
|
context "without Rakefile" do
|
90
90
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
91
|
-
it "should return
|
92
|
-
FrameworkIdentificator.from(@repository_path
|
91
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
92
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
@@ -97,14 +97,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
97
97
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
|
98
98
|
context "with a Rakefile" do
|
99
99
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
100
|
-
it "should return
|
101
|
-
FrameworkIdentificator.from(@repository_path
|
100
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
101
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
102
102
|
end
|
103
103
|
end
|
104
104
|
context "without Rakefile" do
|
105
105
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
106
|
-
it "should return
|
107
|
-
FrameworkIdentificator.from(@repository_path
|
106
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
107
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
108
108
|
end
|
109
109
|
end
|
110
110
|
end
|
@@ -118,14 +118,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
118
118
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
|
119
119
|
context "with a Rakefile" do
|
120
120
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
121
|
-
it "should return
|
122
|
-
FrameworkIdentificator.from(@repository_path
|
121
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
122
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
123
123
|
end
|
124
124
|
end
|
125
125
|
context "without Rakefile" do
|
126
126
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
127
|
-
it "should return
|
128
|
-
FrameworkIdentificator.from(@repository_path
|
127
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
128
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
@@ -133,14 +133,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
133
133
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
|
134
134
|
context "with a Rakefile" do
|
135
135
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
136
|
-
it "should return
|
137
|
-
FrameworkIdentificator.from(@repository_path
|
136
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
137
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
138
138
|
end
|
139
139
|
end
|
140
140
|
context "without Rakefile" do
|
141
141
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
142
|
-
it "should return
|
143
|
-
FrameworkIdentificator.from(@repository_path
|
142
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
143
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
@@ -151,14 +151,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
151
151
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
|
152
152
|
context "with a Rakefile" do
|
153
153
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
154
|
-
it "should return
|
155
|
-
FrameworkIdentificator.from(@repository_path
|
154
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
155
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
156
156
|
end
|
157
157
|
end
|
158
158
|
context "without Rakefile" do
|
159
159
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
160
|
-
it "should return
|
161
|
-
FrameworkIdentificator.from(@repository_path
|
160
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
161
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
162
162
|
end
|
163
163
|
end
|
164
164
|
end
|
@@ -166,14 +166,14 @@ describe FrameworkIdentificator::ApplicationFrameworks::Rails do
|
|
166
166
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
|
167
167
|
context "with a Rakefile" do
|
168
168
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(true) }
|
169
|
-
it "should return
|
170
|
-
FrameworkIdentificator.from(@repository_path
|
169
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
170
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
171
171
|
end
|
172
172
|
end
|
173
173
|
context "without Rakefile" do
|
174
174
|
before { FrameworkIdentificator::ApplicationFrameworks::Rails.stub(:have_rakefile?).and_return(false) }
|
175
|
-
it "should return
|
176
|
-
FrameworkIdentificator.from(@repository_path
|
175
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
176
|
+
FrameworkIdentificator.from(@repository_path).should == {application: nil, testing: []}
|
177
177
|
end
|
178
178
|
end
|
179
179
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe FrameworkIdentificator::TestingFrameworks::Cucumber do
|
4
|
+
|
5
|
+
describe "Attributes" do
|
6
|
+
it "should have an attribute :source" do
|
7
|
+
subject.should respond_to(:source)
|
8
|
+
subject.should respond_to(:source=)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "Class Methods" do
|
13
|
+
describe "TestingFrameworks" do
|
14
|
+
before { @repository_path = Pathname.new(File.join("projects", "my_rails_project")) }
|
15
|
+
describe "for Cucumber framework" do
|
16
|
+
context "without features/support/env.rb file" do
|
17
|
+
before do
|
18
|
+
FrameworkIdentificator::TestingFrameworks::Cucumber.stub(:has_features_env_file?).and_return(false)
|
19
|
+
@framework = FrameworkIdentificator.from(@repository_path)
|
20
|
+
end
|
21
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
22
|
+
@framework.should == {application: nil, testing: []}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
context "with features/support/env.rb file" do
|
26
|
+
before do
|
27
|
+
FrameworkIdentificator::TestingFrameworks::Cucumber.stub(:has_features_env_file?).and_return(true)
|
28
|
+
@framework = FrameworkIdentificator.from(@repository_path)
|
29
|
+
end
|
30
|
+
it "should return not return a nil" do
|
31
|
+
@framework.should_not be_nil
|
32
|
+
end
|
33
|
+
it "should return a Hash with :testing key having an array of a size of 1" do
|
34
|
+
@framework[:testing].size.should == 1
|
35
|
+
end
|
36
|
+
it "should return a Hash with :testing key having an element FrameworkIdentificator::TestingFrameworks::Cucumber" do
|
37
|
+
@framework[:testing].first.class.should be FrameworkIdentificator::TestingFrameworks::Cucumber
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -16,22 +16,25 @@ describe FrameworkIdentificator::TestingFrameworks::Rspec do
|
|
16
16
|
context "without spec/spec_helper.rb file" do
|
17
17
|
before do
|
18
18
|
FrameworkIdentificator::TestingFrameworks::Rspec.stub(:has_spec_spec_helper_file?).and_return(false)
|
19
|
-
@framework = FrameworkIdentificator.from(@repository_path
|
19
|
+
@framework = FrameworkIdentificator.from(@repository_path)
|
20
20
|
end
|
21
|
-
it "should return
|
22
|
-
@framework.should
|
21
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
22
|
+
@framework.should == {application: nil, testing: []}
|
23
23
|
end
|
24
24
|
end
|
25
25
|
context "with spec/spec_helper.rb file" do
|
26
26
|
before do
|
27
27
|
FrameworkIdentificator::TestingFrameworks::Rspec.stub(:has_spec_spec_helper_file?).and_return(true)
|
28
|
-
@framework = FrameworkIdentificator.from(@repository_path
|
28
|
+
@framework = FrameworkIdentificator.from(@repository_path)
|
29
29
|
end
|
30
30
|
it "should return not return a nil" do
|
31
31
|
@framework.should_not be_nil
|
32
32
|
end
|
33
|
-
it "should return an
|
34
|
-
@framework.
|
33
|
+
it "should return a Hash with :testing key having an array of a size of 1" do
|
34
|
+
@framework[:testing].size.should == 1
|
35
|
+
end
|
36
|
+
it "should return a Hash with :testing key having an element FrameworkIdentificator::TestingFrameworks::Rspec" do
|
37
|
+
@framework[:testing].first.class.should be FrameworkIdentificator::TestingFrameworks::Rspec
|
35
38
|
end
|
36
39
|
end
|
37
40
|
end
|
@@ -3,8 +3,11 @@ require "spec_helper"
|
|
3
3
|
describe FrameworkIdentificator::TestingFrameworks do
|
4
4
|
|
5
5
|
describe "#available" do
|
6
|
-
it "should return an array
|
7
|
-
subject.available.should == [
|
6
|
+
it "should return an array of all classes included into the TestingFrameworks module" do
|
7
|
+
subject.available.should == [
|
8
|
+
FrameworkIdentificator::TestingFrameworks::Cucumber,
|
9
|
+
FrameworkIdentificator::TestingFrameworks::Rspec
|
10
|
+
]
|
8
11
|
end
|
9
12
|
end
|
10
13
|
|
@@ -13,7 +13,7 @@ describe FrameworkIdentificator do
|
|
13
13
|
context "with an empty string" do
|
14
14
|
it "should raise an ArgumentError" do
|
15
15
|
lambda {
|
16
|
-
subject.from(""
|
16
|
+
subject.from("")
|
17
17
|
}.should raise_error(ArgumentError)
|
18
18
|
end
|
19
19
|
end
|
@@ -21,19 +21,19 @@ describe FrameworkIdentificator do
|
|
21
21
|
before { @source_string = File.join("projects", "my_rails_project") }
|
22
22
|
it "should not raise anything" do
|
23
23
|
lambda {
|
24
|
-
subject.from(@source_string
|
24
|
+
subject.from(@source_string)
|
25
25
|
}.should_not raise_error
|
26
26
|
end
|
27
27
|
it "should return false" do
|
28
|
-
subject.from(@source_string
|
28
|
+
subject.from(@source_string).should == {application: nil, testing: []}
|
29
29
|
end
|
30
30
|
end
|
31
31
|
describe "with a Pathname object" do
|
32
32
|
before { @repository_path = Pathname.new(File.join("projects", "my_rails_project")) }
|
33
33
|
describe "for a basic folders/files project" do
|
34
34
|
before { @basic_folders_and_files_path = Pathname.new(File.join("spec", "fixtures", "basic_folders_and_files")) }
|
35
|
-
it "should return
|
36
|
-
subject.from(@basic_folders_and_files_path
|
35
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
36
|
+
subject.from(@basic_folders_and_files_path).should == {application: nil, testing: []}
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -45,8 +45,8 @@ describe FrameworkIdentificator do
|
|
45
45
|
end
|
46
46
|
describe "for a basic folders/files project" do
|
47
47
|
before { @basic_folders_and_files_path = Pathname.new(File.join("spec", "fixtures", "basic_folders_and_files")) }
|
48
|
-
it "should return
|
49
|
-
subject.from(@basic_folders_and_files_path
|
48
|
+
it "should return a Hash with a :application key with a nil value and a :testing key with an empty Array as value" do
|
49
|
+
subject.from(@basic_folders_and_files_path).should == {application: nil, testing: []}
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: framework_identificator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Identify the used framework of a given project.
|
15
15
|
email:
|
@@ -33,12 +33,14 @@ files:
|
|
33
33
|
- lib/framework_identificator/application_frameworks/rails.rb
|
34
34
|
- lib/framework_identificator/framework.rb
|
35
35
|
- lib/framework_identificator/testing_frameworks.rb
|
36
|
+
- lib/framework_identificator/testing_frameworks/cucumber.rb
|
36
37
|
- lib/framework_identificator/testing_frameworks/rspec.rb
|
37
38
|
- lib/framework_identificator/version.rb
|
38
39
|
- spec/fixtures/basic_folders_and_files/backup/main.sh
|
39
40
|
- spec/fixtures/basic_folders_and_files/main.sh
|
40
41
|
- spec/framework_identificator/application_frameworks/rails_spec.rb
|
41
42
|
- spec/framework_identificator/application_frameworks_spec.rb
|
43
|
+
- spec/framework_identificator/testing_frameworks/cucumber_spec.rb
|
42
44
|
- spec/framework_identificator/testing_frameworks/rspec_spec.rb
|
43
45
|
- spec/framework_identificator/testing_frameworks_spec.rb
|
44
46
|
- spec/framework_identificator_spec.rb
|
@@ -57,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
59
|
version: '0'
|
58
60
|
segments:
|
59
61
|
- 0
|
60
|
-
hash:
|
62
|
+
hash: 1365417599632752041
|
61
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
64
|
none: false
|
63
65
|
requirements:
|
@@ -66,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
68
|
version: '0'
|
67
69
|
segments:
|
68
70
|
- 0
|
69
|
-
hash:
|
71
|
+
hash: 1365417599632752041
|
70
72
|
requirements: []
|
71
73
|
rubyforge_project:
|
72
74
|
rubygems_version: 1.8.24
|
@@ -79,6 +81,7 @@ test_files:
|
|
79
81
|
- spec/fixtures/basic_folders_and_files/main.sh
|
80
82
|
- spec/framework_identificator/application_frameworks/rails_spec.rb
|
81
83
|
- spec/framework_identificator/application_frameworks_spec.rb
|
84
|
+
- spec/framework_identificator/testing_frameworks/cucumber_spec.rb
|
82
85
|
- spec/framework_identificator/testing_frameworks/rspec_spec.rb
|
83
86
|
- spec/framework_identificator/testing_frameworks_spec.rb
|
84
87
|
- spec/framework_identificator_spec.rb
|