ridgepole 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc060910006f1f43aab95db51d212fe5d5b0680c
4
- data.tar.gz: a680fd5528a35e823889ae79014e512a3e33ff6e
3
+ metadata.gz: 7284de718aedfc85207971f129586dffa5fd49a7
4
+ data.tar.gz: 2db55a88104e340788971af634b202ebf80a93db
5
5
  SHA512:
6
- metadata.gz: 4df78e194f747225f987cc33033f41b991a942381695fddc4e7f2a6c0ec1f04ee61e6c55cc85a7abe476b8441516f370c463058452f28506e587c4cacdf83df6
7
- data.tar.gz: abad3822b1f2500687525dcd69db12cbde58222164cf32aaf47c61a1e626265e7b860348e2d0f01b9c0cd6500059125267ea444202702fd672b6afccd38a14ab
6
+ metadata.gz: ed41b7613dcd5e5a87b3673a27bffbad4043638203af53941d1798b77841a639cdb3d696ffff77bfed52d3bf3b8eebe0344f426d759eed4cb40e6ee108ddb46e
7
+ data.tar.gz: 875a498eba1c73fa5898d1522106bcddc4bf22045198823b9e1d486242cb33b607d0b901ae7ca02e51444e64cf3ce01983fdabe3f25645f496c726a134fad241
@@ -46,7 +46,13 @@ class Ridgepole::DSLParser
46
46
 
47
47
  def self.eval(dsl, opts = {})
48
48
  ctx = self.new(opts)
49
- ctx.instance_eval(dsl)
49
+
50
+ if opts[:path]
51
+ ctx.instance_eval(dsl, opts[:path])
52
+ else
53
+ ctx.instance_eval(dsl)
54
+ end
55
+
50
56
  ctx.__definition
51
57
  end
52
58
 
@@ -83,9 +89,9 @@ class Ridgepole::DSLParser
83
89
  schemafile = File.join(@__working_dir, file)
84
90
 
85
91
  if File.exist?(schemafile)
86
- instance_eval(File.read(schemafile))
92
+ instance_eval(File.read(schemafile), schemafile)
87
93
  elsif File.exist?(schemafile + '.rb')
88
- instance_eval(File.read(schemafile + '.rb'))
94
+ instance_eval(File.read(schemafile + '.rb'), schemafile + '.rb')
89
95
  else
90
96
  Kernel.require(file)
91
97
  end
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.3.9'
2
+ VERSION = '0.4.0'
3
3
  end
data/ridgepole.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'activerecord'
22
- spec.add_dependency 'activerecord-mysql-unsigned', '>= 0.1.3'
22
+ spec.add_dependency 'activerecord-mysql-unsigned', '~> 0.1.3'
23
23
  spec.add_development_dependency 'bundler'
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'rspec', '>= 3.0.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: activerecord-mysql-unsigned
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.1.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.1.3
41
41
  - !ruby/object:Gem::Dependency