dev_commands 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,77 @@
1
1
  require_relative '../lib/commands.rb'
2
2
 
3
3
  describe Commands do
4
- it "should be able to automatically generate commands for a particular directory" do
4
+ it "should be able to automatically generate commands for the gem-example directory" do
5
5
  dir='spec/gem-example'
6
6
  expect(File.exists?("#{dir}/rakefile.rb")).to eq(true)
7
7
 
8
8
  Dir.chdir(dir) do
9
9
  commands=Commands.new
10
- expect(commands.has_key?(:pull)).to eq(true)
11
- commands[:pull].update
12
- expect(commands[:pull].length).to eq(0)
10
+ expect(commands.has_key?(:build)).to eq(true)
11
+ commands[:build].update
12
+ expect(commands[:build].length).to eq(1)
13
+
14
+ expect(Command.exit_code('rake default')).to eq(0)
15
+ expect(Command.exit_code('rake build')).to eq(0)
16
+ expect(File.exists?('gem-example-0.0.0.gem')).to eq(true)
17
+ expect(Command.exit_code('rake clobber')).to eq(0)
18
+ expect(!File.exists?('gem-example-0.0.0.gem')).to eq(true)
19
+ end
20
+ end
21
+
22
+ it "should be able to automatically generate commands for the sln-vs12-example directory" do
23
+ dir='spec/sln-vs12-example'
24
+ expect(File.exists?("#{dir}/rakefile.rb")).to eq(true)
25
+
26
+ Dir.chdir(dir) do
27
+ commands=Commands.new
28
+ expect(commands.has_key?(:build)).to eq(true)
29
+ commands[:build].update
30
+
31
+ if(RUBY_PLATFORM.include?("mingw"))
32
+ expect(Command.exit_code('rake default')).to eq(0)
33
+ expect(Command.exit_code('rake build')).to eq(0)
34
+ expect(File.exists?('csharp-library/bin/Debug/csharp-library.dll')).to eq(true)
35
+ expect(File.exists?('csharp-library/bin/Release/csharp-library.dll')).to eq(true)
36
+ expect(File.exists?('cpp-library/bin/Debug/cpp-library.dll')).to eq(true)
37
+ expect(File.exists?('cpp-library/bin/Release/cpp-library.dll')).to eq(true)
38
+ expect(Command.exit_code('rake clobber')).to eq(0)
39
+ expect(File.exists?('csharp-library/bin/Debug/csharp-library.dll')).to eq(false)
40
+ expect(File.exists?('csharp-library/bin/Release/csharp-library.dll')).to eq(false)
41
+ expect(File.exists?('cpp-library/bin/Debug/cpp-library.dll')).to eq(false)
42
+ expect(File.exists?('cpp-library/bin/Release/cpp-library.dll')).to eq(false)
43
+ else
44
+ expect(Command.exit_code('rake default')).not_to eq(0)
45
+ expect(Command.exit_code('rake build')).not_to eq(0)
46
+ end
13
47
  end
14
48
  end
49
+
50
+ it "should be able to automatically generate commands for the sln-vs9-example directory" do
51
+ dir='spec/sln-vs9-example'
52
+ expect(File.exists?("#{dir}/rakefile.rb")).to eq(true)
53
+
54
+ Dir.chdir(dir) do
55
+ commands=Commands.new
56
+ expect(commands.has_key?(:build)).to eq(true)
57
+ commands[:build].update
58
+
59
+ if(RUBY_PLATFORM.include?("mingw"))
60
+ expect(Command.exit_code('rake default')).to eq(0)
61
+ expect(Command.exit_code('rake build')).to eq(0)
62
+ expect(File.exists?('csharp-library/bin/Debug/csharp-library.dll')).to eq(true)
63
+ expect(File.exists?('csharp-library/bin/Release/csharp-library.dll')).to eq(true)
64
+ expect(File.exists?('cpp-library/bin/Debug/cpp-library.dll')).to eq(true)
65
+ expect(File.exists?('cpp-library/bin/Release/cpp-library.dll')).to eq(true)
66
+ expect(Command.exit_code('rake clobber')).to eq(0)
67
+ expect(File.exists?('csharp-library/bin/Debug/csharp-library.dll')).to eq(false)
68
+ expect(File.exists?('csharp-library/bin/Release/csharp-library.dll')).to eq(false)
69
+ expect(File.exists?('cpp-library/bin/Debug/cpp-library.dll')).to eq(false)
70
+ expect(File.exists?('cpp-library/bin/Release/cpp-library.dll')).to eq(false)
71
+ else
72
+ expect(Command.exit_code('rake default')).not_to eq(0)
73
+ expect(Command.exit_code('rake build')).not_to eq(0)
74
+ end
75
+ end
76
+ end
15
77
  end
@@ -1,5 +1,11 @@
1
1
  require_relative('../../lib/dev_commands.rb')
2
2
 
3
+ desc 'build'
4
+ task :build do
5
+ COMMANDS[:build].update
6
+ COMMANDS[:build].execute
7
+ end
8
+
3
9
  task :default do
4
10
  COMMANDS.execute
5
11
  end
@@ -0,0 +1,12 @@
1
+ require_relative('../../lib/dev_commands.rb')
2
+
3
+ CLOBBER.include('csharp-library/bin','csharp-library/obj','cpp-library/bin','cpp-library/obj')
4
+ desc 'build'
5
+ task :build do
6
+ COMMANDS[:build].update
7
+ COMMANDS[:build].execute
8
+ end
9
+
10
+ task :default do
11
+ COMMANDS.execute
12
+ end
@@ -0,0 +1,12 @@
1
+ require_relative('../../lib/dev_commands.rb')
2
+
3
+ CLOBBER.include('csharp-library/bin','csharp-library/obj','cpp-library/bin','cpp-library/obj')
4
+ desc 'build'
5
+ task :build do
6
+ COMMANDS[:build].update
7
+ COMMANDS[:build].execute
8
+ end
9
+
10
+ task :default do
11
+ COMMANDS.execute
12
+ end
data/spec/text_spec.rb CHANGED
@@ -1,12 +1,12 @@
1
- require_relative '../lib/text.rb'
2
-
3
- describe Text do
4
- it "should be able to replace text in file" do
5
- FileUtils.mkdir('tmp') if(!File.exists?('tmp'))
6
- File.open('tmp/test.txt','w'){|f|
7
- f.write("test thing")
8
- }
9
- Text.replace_in_file('tmp/test.txt','thing','string')
10
- expect(IO.read('tmp/test.txt').include?('test string')).to eq(true)
11
- end
1
+ require_relative '../lib/text.rb'
2
+
3
+ describe Text do
4
+ it "should be able to replace text in file" do
5
+ FileUtils.mkdir('tmp') if(!File.exists?('tmp'))
6
+ File.open('tmp/test.txt','w'){|f|
7
+ f.write("test thing")
8
+ }
9
+ Text.replace_in_file('tmp/test.txt','thing','string')
10
+ expect(IO.read('tmp/test.txt').include?('test string')).to eq(true)
11
+ end
12
12
  end
metadata CHANGED
@@ -1,125 +1,142 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Lou Parslow
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-01-12 00:00:00.000000000 Z
12
+ date: 2015-01-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rspec
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: yard
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: bundler
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - '>='
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - '>='
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rake
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - '>='
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - '>='
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: rspec
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0'
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: yard
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - '>='
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - '>='
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: bundler
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - '>='
131
+ - - ! '>='
116
132
  - !ruby/object:Gem::Version
117
133
  version: '0'
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - '>='
139
+ - - ! '>='
123
140
  - !ruby/object:Gem::Version
124
141
  version: '0'
125
142
  description: execution of system commands
@@ -129,6 +146,7 @@ extensions: []
129
146
  extra_rdoc_files: []
130
147
  files:
131
148
  - lib/add.rb
149
+ - lib/analyze.rb
132
150
  - lib/array.rb
133
151
  - lib/build.rb
134
152
  - lib/clean.rb
@@ -141,6 +159,7 @@ files:
141
159
  - lib/gemspec.rb
142
160
  - lib/git.rb
143
161
  - lib/hash.rb
162
+ - lib/internet.rb
144
163
  - lib/msbuild.rb
145
164
  - lib/publish.rb
146
165
  - lib/pull.rb
@@ -150,35 +169,38 @@ files:
150
169
  - lib/text.rb
151
170
  - lib/timer.rb
152
171
  - lib/update.rb
153
- - spec/command_spec.rb
154
172
  - spec/commands_spec.rb
173
+ - spec/command_spec.rb
155
174
  - spec/gem-example/rakefile.rb
175
+ - spec/sln-vs12-example/rakefile.rb
176
+ - spec/sln-vs9-example/rakefile.rb
156
177
  - spec/text_spec.rb
157
178
  - LICENSE
158
179
  - README.md
159
180
  homepage: http://github.com/lou-parslow/dev_commands.gem
160
181
  licenses:
161
182
  - Apache 2.0
162
- metadata: {}
163
183
  post_install_message:
164
184
  rdoc_options: []
165
185
  require_paths:
166
186
  - lib
167
187
  required_ruby_version: !ruby/object:Gem::Requirement
188
+ none: false
168
189
  requirements:
169
- - - '>='
190
+ - - ! '>='
170
191
  - !ruby/object:Gem::Version
171
192
  version: '0'
172
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
+ none: false
173
195
  requirements:
174
- - - '>='
196
+ - - ! '>='
175
197
  - !ruby/object:Gem::Version
176
198
  version: '0'
177
199
  requirements: []
178
200
  rubyforge_project:
179
- rubygems_version: 2.0.14
201
+ rubygems_version: 1.8.28
180
202
  signing_key:
181
- specification_version: 4
203
+ specification_version: 3
182
204
  summary: gem to execute system commands
183
205
  test_files: []
184
206
  has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: cf409f59ec9828be63d4562c2ff738265c7e3e60
4
- data.tar.gz: 205385c27922be4e6c669e104e6774bb86a090f6
5
- SHA512:
6
- metadata.gz: 9f4cc9b8509db05aa6ed0a23532e4d18da5653f0239c9603e12404f9abd85635664ed4e64a5244c94b014243d4dd464ceff5148e32f7a83be2bb8b2964d0e96c
7
- data.tar.gz: 843faae67ae8a81e127cf6f360c3926b28c34cc1a5c9d80f6027cddd55428c89b76713f42b2f1c1a513bd09d5a60f6734a21198ede4ae3246a6e73035744134c