rego 2.0.0 → 2.1.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: 9fb6e8eb8a8d4955a5a913cf9f2714c558ac742c
4
- data.tar.gz: 7a280fc424eb8ccea11558623ec4b42899db5c88
3
+ metadata.gz: 81b3c327cbc803c238d9aa4fecd8a178a5b89d71
4
+ data.tar.gz: 991daf0148a99d859d3d010b7d30c78ade144ee1
5
5
  SHA512:
6
- metadata.gz: 40590d449e2c39840b7a773cceb4e8d601bfe46eb4eb42a49153c353e42ec8d7e3c71341a680f5539fff647fe3a38861b359d8cfcd6822f4f590690c0ae644e8
7
- data.tar.gz: b1030576df67092e59464a8c1b32aba6aad6f67f51dbf04d2881da3e14515c06f06dbc4f2f5c3af95d9b53aa337682e8332515be275800f7aa284812b21dadb5
6
+ metadata.gz: 395205b2b86a2449ed4ff58ab9343bbea8da055b6574477f18da28d4c3be8df0677568be085c851d69faf149f472deaa85daa61920cbcd7003ad6efe19db44c8
7
+ data.tar.gz: ea33a297d3a489fe31c49cb1f90e8b99eaa91008c35da8761d2901ece6dfe5434d5ccedc07f9b5ce55b3ae0d27ce55924d9efaa6439dc2daf24f185cc50828c9
data/Rakefile CHANGED
@@ -261,28 +261,29 @@ BEGIN {
261
261
  #
262
262
  This = OpenStruct.new
263
263
 
264
- This.file = File.expand_path(__FILE__)
265
- This.dir = File.dirname(This.file)
264
+ This.file = File.expand_path(__FILE__)
265
+ This.dir = File.dirname(This.file)
266
266
  This.pkgdir = File.join(This.dir, 'pkg')
267
267
 
268
- # grok lib
269
- #
270
- lib = ENV['LIB']
271
- unless lib
272
- lib = File.basename(Dir.pwd).sub(/[-].*$/, '')
273
- end
274
- This.lib = lib
268
+ This.lib = File.basename(Dir.pwd)
269
+ This._lib = "#{ This.dir }/lib/#{ This.lib }/_lib.rb"
275
270
 
276
- # grok version
271
+ # load meta lib info
277
272
  #
278
- version = ENV['VERSION']
279
- unless version
280
- require "./lib/#{ This.lib }/version.rb"
281
- This.name = lib.capitalize
282
- This.object = eval(This.name)
283
- version = This.object.send(:version)
273
+ a = Object.constants.dup
274
+ require This._lib
275
+ b = Object.constants.dup
276
+ added = b - a
277
+ const = added.first
278
+
279
+ if added.size > 1
280
+ STDERR.puts "WARNING: defined multiple constants #{ added.inspect } in #{ _lib }, using #{ const } !!!"
284
281
  end
285
- This.version = version
282
+
283
+ This.const = const
284
+ This.object = Object.const_get(This.const)
285
+ This.name = This.object.name
286
+ This.version = This.object.send(:version)
286
287
 
287
288
  # see if dependencies are export by the module
288
289
  #
@@ -297,12 +298,12 @@ BEGIN {
297
298
 
298
299
  # discover full path to this ruby executable
299
300
  #
300
- c = RbConfig::CONFIG
301
- bindir = c["bindir"] || c['BINDIR']
301
+ c = RbConfig::CONFIG
302
+ bindir = c["bindir"] || c['BINDIR']
302
303
  ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
303
- ruby_ext = c['EXEEXT'] || ''
304
- ruby = File.join(bindir, (ruby_install_name + ruby_ext))
305
- This.ruby = ruby
304
+ ruby_ext = c['EXEEXT'] || ''
305
+ ruby = File.join(bindir, (ruby_install_name + ruby_ext))
306
+ This.ruby = ruby
306
307
 
307
308
  # some utils
308
309
  #
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  require 'tmpdir'
5
5
 
6
6
  module Rego
7
- require_relative 'rego/version.rb'
7
+ require_relative 'rego/_lib.rb'
8
8
  require_relative 'rego/utils.rb'
9
9
  end
10
10
 
@@ -1,5 +1,5 @@
1
1
  module Rego
2
- Version = '2.0.0' unless defined?(Version)
2
+ Version = '2.1.0' unless defined?(Version)
3
3
 
4
4
  def Rego.version
5
5
  Rego::Version
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "rego"
6
- spec.version = "2.0.0"
6
+ spec.version = "2.1.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "rego"
9
9
  spec.description = "description: rego kicks the ass"
@@ -12,17 +12,14 @@ Gem::Specification::new do |spec|
12
12
  spec.files =
13
13
  ["README.md",
14
14
  "Rakefile",
15
- "a.rb",
16
15
  "bin",
17
16
  "bin/rego",
18
17
  "lib",
19
18
  "lib/rego",
20
19
  "lib/rego.rb",
20
+ "lib/rego/_lib.rb",
21
21
  "lib/rego/utils.rb",
22
- "lib/rego/version.rb",
23
- "rego.gemspec",
24
- "tmp/bar.txt",
25
- "tmp/foo.txt"]
22
+ "rego.gemspec"]
26
23
 
27
24
  spec.executables = ["rego"]
28
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rego
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-01 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: main
@@ -61,14 +61,11 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - README.md
63
63
  - Rakefile
64
- - a.rb
65
64
  - bin/rego
66
65
  - lib/rego.rb
66
+ - lib/rego/_lib.rb
67
67
  - lib/rego/utils.rb
68
- - lib/rego/version.rb
69
68
  - rego.gemspec
70
- - tmp/bar.txt
71
- - tmp/foo.txt
72
69
  homepage: https://github.com/ahoward/rego
73
70
  licenses:
74
71
  - Ruby
data/a.rb DELETED
@@ -1,14 +0,0 @@
1
- require 'rb-fsevent'
2
- require 'map'
3
- fsevent = FSEvent.new
4
- fsevent.watch Dir.pwd do |paths, event_meta|
5
- event_meta = Map.for(event_meta)
6
- event_meta.events.each do |event|
7
- puts "event ID: #{event.id}"
8
- puts "path: #{event.path}"
9
- puts "c flags: #{event.cflags}"
10
- puts "named flags: #{event.flags.join(', ')}"
11
- # named flags will include strings such as `ItemInodeMetaMod` or `OwnEvent`
12
- end
13
- end
14
- fsevent.run
File without changes
File without changes