neri 0.1.5 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/neri/runtime.rb CHANGED
@@ -39,7 +39,7 @@ module Neri
39
39
 
40
40
  def require(feature)
41
41
  filepath = nil
42
- load_path.each do |path|
42
+ (feature.match?(/\A([a-z]:|\\|\/|\.)/i) ? [""] : load_path).each do |path|
43
43
  ["", ".rb"].each do |ext|
44
44
  next unless exist_in_datafile?(path + feature + ext)
45
45
  filepath = adjust_path(path + feature + ext)
@@ -49,7 +49,7 @@ module Neri
49
49
  if filepath
50
50
  return false if $LOADED_FEATURES.index(filepath)
51
51
  code = load_code(filepath)
52
- eval(code, nil, filepath)
52
+ eval(code, TOPLEVEL_BINDING, filepath)
53
53
  $LOADED_FEATURES.push(filepath)
54
54
  return true
55
55
  else
@@ -66,9 +66,9 @@ module Neri
66
66
  if filepath
67
67
  code = load_code(filepath)
68
68
  if priv
69
- eval(code, nil, filepath)
70
- else
71
69
  Module.new.module_eval(code, filepath)
70
+ else
71
+ eval(code, TOPLEVEL_BINDING, filepath)
72
72
  end
73
73
  else
74
74
  _neri_orig_load(filepath || file, priv)
@@ -130,8 +130,9 @@ module Neri
130
130
  end
131
131
 
132
132
  def load_path()
133
- return $LOAD_PATH unless @system_dir
134
- return $LOAD_PATH.map{|path| path.sub(@system_dir, "*neri*#{File::SEPARATOR}") + File::SEPARATOR }
133
+ paths = $LOAD_PATH.map { |path| path.encode(Encoding::UTF_8) }
134
+ return paths unless @system_dir
135
+ paths.map { |path| path.sub(@system_dir, "*neri*#{File::SEPARATOR}") + File::SEPARATOR }
135
136
  end
136
137
 
137
138
  def load_code(file)
data/lib/neri/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neri
2
- VERSION = "0.1.5"
2
+ VERSION = "0.9.1"
3
3
  end
data/neri.gemspec CHANGED
@@ -1,36 +1,35 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "neri/version"
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/neri/version"
5
4
 
6
5
  Gem::Specification.new do |spec|
7
6
  spec.name = "neri"
8
7
  spec.version = Neri::VERSION
9
8
  spec.authors = ["nodai2hITC"]
10
9
  spec.email = ["nodai2h.itc@gmail.com"]
11
-
10
+
12
11
  spec.summary = %q{One-Click Ruby Application Builder}
13
12
  spec.description = %q{Neri builds Windows batfile or exefile from Ruby script.}
14
13
  spec.homepage = "https://github.com/nodai2hITC/neri"
15
14
  spec.license = "MIT"
16
-
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- if spec.respond_to?(:metadata)
20
- # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
- else
22
- raise "RubyGems 2.0 or newer is required to protect against " \
23
- "public gem pushes."
24
- end
25
-
26
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
- f.match(%r{^(test|spec|features)/})
15
+ spec.required_ruby_version = ">= 2.4.0"
16
+
17
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = spec.homepage
21
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
28
29
  end
29
30
  spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
32
  spec.require_paths = ["lib"]
32
-
33
- spec.add_development_dependency "bundler", "~> 1.15"
34
- spec.add_development_dependency "rake", "~> 10.0"
35
- spec.add_development_dependency "pry"
33
+
34
+ spec.add_dependency "win32api"
36
35
  end
metadata CHANGED
@@ -1,51 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nodai2hITC
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-18 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.15'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.15'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: pry
14
+ name: win32api
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - ">="
46
18
  - !ruby/object:Gem::Version
47
19
  version: '0'
48
- type: :development
20
+ type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
@@ -60,7 +32,6 @@ executables:
60
32
  extensions: []
61
33
  extra_rdoc_files: []
62
34
  files:
63
- - ".gitignore"
64
35
  - Gemfile
65
36
  - LICENSE.txt
66
37
  - README.ja.md
@@ -81,8 +52,10 @@ files:
81
52
  homepage: https://github.com/nodai2hITC/neri
82
53
  licenses:
83
54
  - MIT
84
- metadata: {}
85
- post_install_message:
55
+ metadata:
56
+ homepage_uri: https://github.com/nodai2hITC/neri
57
+ source_code_uri: https://github.com/nodai2hITC/neri
58
+ post_install_message:
86
59
  rdoc_options: []
87
60
  require_paths:
88
61
  - lib
@@ -90,16 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
63
  requirements:
91
64
  - - ">="
92
65
  - !ruby/object:Gem::Version
93
- version: '0'
66
+ version: 2.4.0
94
67
  required_rubygems_version: !ruby/object:Gem::Requirement
95
68
  requirements:
96
69
  - - ">="
97
70
  - !ruby/object:Gem::Version
98
71
  version: '0'
99
72
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.6.12
102
- signing_key:
73
+ rubygems_version: 3.2.27
74
+ signing_key:
103
75
  specification_version: 4
104
76
  summary: One-Click Ruby Application Builder
105
77
  test_files: []
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/