import.rb 0.1.0 → 0.1.1

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: 49a2a066c4e73e5d4da90d8d0e18410c5ded3caf
4
- data.tar.gz: 7ab23909d9e27dc16605af2c105bd0464c894886
3
+ metadata.gz: 48db16938ffa3703803957ea942a10f840017d52
4
+ data.tar.gz: 96fdb9d4a627ccbfd9f8fb9a32dc6622f552892b
5
5
  SHA512:
6
- metadata.gz: 231e703bedcd60a7236f7b56b9b5f02b1479c429613b225fb4e24a0bd6c6be77ec95b740be2f80474ce5143244605a2a1c53ff8ebf9b53d8b54f28bd4c533749
7
- data.tar.gz: 90b500ea64a75838292ed79452d97fca29eac9fc9247eb209feaf8e40079539a6d1d905b7abcdeb8121e357e4cb4095452de8a6bdbe0122e29f753b668e44dda
6
+ metadata.gz: 92c7eed7a96e4875b9547d144273722f02f9ee0997da6794be29905b3a872fce26a0a5d5643a38415d8565b5ca2e559803b92a81120e6eb2deca49df01004d17
7
+ data.tar.gz: 83c672d5e01fde571ac39e7a5837a8c8c78cdebc40235645f37144f8abf13e80659e9f76b04d055d88196d61f8c1786586186f19e2754cbde295e9b1afb5a062
data/README.md CHANGED
@@ -1,15 +1,14 @@
1
- # Import::Rb
1
+ # import.rb
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/import/rb`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Instead of `Kernel.require`.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
5
 
7
6
  ## Installation
8
7
 
9
8
  Add this line to your application's Gemfile:
10
9
 
11
10
  ```ruby
12
- gem 'import-rb'
11
+ gem 'import.rb'
13
12
  ```
14
13
 
15
14
  And then execute:
@@ -18,11 +17,29 @@ And then execute:
18
17
 
19
18
  Or install it yourself as:
20
19
 
21
- $ gem install import-rb
20
+ $ gem install import.rb
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
24
+ - cat.rb
25
+
26
+ ```ruby
27
+ class Cat
28
+ def meow
29
+ puts 'meow meow'
30
+ end
31
+ end
32
+ ```
33
+
34
+ - main.rb
35
+
36
+ ```ruby
37
+ require 'import'
38
+ cat = import('./cat')::Cat
39
+ cat.new.meow # => meow meow
40
+
41
+ # Cat # => uninitialized constant Cat (NameError)
42
+ ```
26
43
 
27
44
  ## Development
28
45
 
@@ -32,5 +49,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
49
 
33
50
  ## Contributing
34
51
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/import-rb.
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/pocke/import.rb .
36
53
 
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Masataka Kuwabara"]
10
10
  spec.email = ["p.ck.t22@gmail.com"]
11
11
 
12
- spec.summary = "Instead of require method"
13
- spec.description = "Instead of require method"
12
+ spec.summary = "Instead of Kernel.require"
13
+ spec.description = File.read('./README.md')
14
14
  spec.homepage = "https://github.com/pocke/import.rb"
15
15
  spec.license = 'CC0-1.0'
16
16
 
@@ -18,10 +18,8 @@ exist_file = -> (path, fname = nil) {
18
18
  }
19
19
 
20
20
  # @param [String] feature
21
- # @return [Pathname|nil]
21
+ # @return [String|nil]
22
22
  find_file = -> (feature) {
23
- # TODO: relative path
24
-
25
23
  # absolute path
26
24
  if feature[0] == '/'
27
25
  full_path = exist_file.(feature)
@@ -1 +1 @@
1
- VERSION = '0.1.0'
1
+ VERSION = '0.1.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: import.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Kuwabara
@@ -38,7 +38,60 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Instead of require method
41
+ description: |+
42
+ # import.rb
43
+
44
+ Instead of `Kernel.require`.
45
+
46
+
47
+ ## Installation
48
+
49
+ Add this line to your application's Gemfile:
50
+
51
+ ```ruby
52
+ gem 'import.rb'
53
+ ```
54
+
55
+ And then execute:
56
+
57
+ $ bundle
58
+
59
+ Or install it yourself as:
60
+
61
+ $ gem install import.rb
62
+
63
+ ## Usage
64
+
65
+ - cat.rb
66
+
67
+ ```ruby
68
+ class Cat
69
+ def meow
70
+ puts 'meow meow'
71
+ end
72
+ end
73
+ ```
74
+
75
+ - main.rb
76
+
77
+ ```ruby
78
+ require 'import'
79
+ cat = import('./cat')::Cat
80
+ cat.new.meow # => meow meow
81
+
82
+ # Cat # => uninitialized constant Cat (NameError)
83
+ ```
84
+
85
+ ## Development
86
+
87
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
88
+
89
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
90
+
91
+ ## Contributing
92
+
93
+ Bug reports and pull requests are welcome on GitHub at https://github.com/pocke/import.rb .
94
+
42
95
  email:
43
96
  - p.ck.t22@gmail.com
44
97
  executables: []
@@ -77,5 +130,5 @@ rubyforge_project:
77
130
  rubygems_version: 2.4.5.1
78
131
  signing_key:
79
132
  specification_version: 4
80
- summary: Instead of require method
133
+ summary: Instead of Kernel.require
81
134
  test_files: []