obvious 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Obvious
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/obvious.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "obvious/version"
1
+ require 'obvious/version'
2
+ require 'obvious/contract'
2
3
  require 'yaml'
3
4
 
4
5
  module Obvious
@@ -34,7 +35,7 @@ spec = Gem::Specification.find_by_name("obvious")
34
35
  gem_root = spec.gem_dir
35
36
  gem_lib = gem_root + "/lib"
36
37
 
37
- `cp #{gem_lib}/obvious/files/contract.rb #{target_path}/app/contracts/contract.rb`
38
+ #`cp #{gem_lib}/obvious/files/contract.rb #{target_path}/app/contracts/contract.rb`
38
39
  `cp #{gem_lib}/obvious/files/Rakefile #{target_path}/Rakefile`
39
40
  entities = Hash.new
40
41
  jacks = Hash.new
@@ -123,7 +124,7 @@ end
123
124
  FIN
124
125
  snake_name = action['Action'].gsub(/(.)([A-Z])/,'\1_\2').downcase
125
126
 
126
- filename = "app/actions/#{snake_name}.rb"
127
+ filename = "#{app_dir}/actions/#{snake_name}.rb"
127
128
  File.open(filename, 'w') {|f| f.write(output) }
128
129
 
129
130
  #puts output
@@ -142,7 +143,7 @@ end
142
143
 
143
144
  FIN
144
145
 
145
- filename = "app/spec/actions/#{snake_name}_spec.rb"
146
+ filename = "#{app_dir}/spec/actions/#{snake_name}_spec.rb"
146
147
  File.open(filename, 'w') {|f| f.write(output) }
147
148
 
148
149
  #puts output
@@ -192,7 +193,7 @@ end
192
193
  FIN
193
194
  snake_name = name.gsub(/(.)([A-Z])/,'\1_\2').downcase
194
195
 
195
- filename = "app/entities/#{snake_name}.rb"
196
+ filename = "#{app_dir}/entities/#{snake_name}.rb"
196
197
  File.open(filename, 'w') {|f| f.write(output) }
197
198
 
198
199
  output = <<FIN
@@ -204,7 +205,7 @@ end
204
205
 
205
206
 
206
207
  FIN
207
- filename = "app/spec/entities/#{snake_name}_spec.rb"
208
+ filename = "#{app_dir}/spec/entities/#{snake_name}_spec.rb"
208
209
  File.open(filename, 'w') {|f| f.write(output) }
209
210
 
210
211
 
@@ -245,7 +246,7 @@ jacks.each do |k, v|
245
246
 
246
247
 
247
248
  output = <<FIN
248
- require_relative 'contract'
249
+ require 'obvious'
249
250
 
250
251
  class #{k}Contract < Contract
251
252
  def self.contracts
@@ -257,13 +258,13 @@ FIN
257
258
 
258
259
  snake_name = name.gsub(/(.)([A-Z])/,'\1_\2').downcase
259
260
 
260
- filename = "app/contracts/#{snake_name}_contract.rb"
261
+ filename = "#{app_dir}/contracts/#{snake_name}_jack_contract.rb"
261
262
  File.open(filename, 'w') {|f| f.write(output) }
262
263
 
263
264
  #puts output
264
265
 
265
266
  output = <<FIN
266
- require_relative '../../contracts/#{snake_name}_contract'
267
+ require_relative '../../contracts/#{snake_name}_jack_contract'
267
268
 
268
269
  describe #{k}Contract do
269
270
  #{method_specs}
@@ -271,7 +272,7 @@ end
271
272
 
272
273
  FIN
273
274
 
274
- filename = "app/spec/contracts/#{snake_name}_spec.rb"
275
+ filename = "#{app_dir}/spec/contracts/#{snake_name}_jack_spec.rb"
275
276
  File.open(filename, 'w') {|f| f.write(output) }
276
277
 
277
278
  #puts output
data/obvious.gemspec CHANGED
@@ -10,11 +10,10 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["brianknapp@gmail.com"]
11
11
  gem.description = "A set of tools to build apps using the Obvious Architecture"
12
12
  gem.summary = "Isn't it Obvious?"
13
- gem.homepage = ""
13
+ gem.homepage = "http://obvious.retromocha.com/"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- #gem.executables << 'obvious'
18
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
18
  gem.require_paths = ["lib"]
20
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obvious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-22 00:00:00.000000000 Z
12
+ date: 2012-12-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A set of tools to build apps using the Obvious Architecture
15
15
  email:
@@ -26,11 +26,11 @@ files:
26
26
  - Rakefile
27
27
  - bin/obvious
28
28
  - lib/obvious.rb
29
+ - lib/obvious/contract.rb
29
30
  - lib/obvious/files/Rakefile
30
- - lib/obvious/files/contract.rb
31
31
  - lib/obvious/version.rb
32
32
  - obvious.gemspec
33
- homepage: ''
33
+ homepage: http://obvious.retromocha.com/
34
34
  licenses: []
35
35
  post_install_message:
36
36
  rdoc_options: []
File without changes