method_source 0.9.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +139 -0
- data/CHANGELOG.md +10 -0
- data/LICENSE +1 -4
- data/README.markdown +4 -2
- data/lib/method_source/code_helpers.rb +1 -1
- data/lib/method_source/version.rb +1 -1
- data/method_source.gemspec +3 -5
- data/spec/method_source_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +5 -5
- data/.travis.yml +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe83abc213aa091b0cd4450c6c1d58bff6a9160aba41afc3641ef4424428d0eb
|
4
|
+
data.tar.gz: 46c108059ac1d6f7967c44e20104bfa5b95a4e15ba434ec007a7d3da4f268a9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b386bd1c4d7ab90649bacf152c42bf92ad8c2ebe6654b58a18dfc0fb70180affa10a151958280a7aa91cf7eb3b443f6c9806d69bb1849694aac5db194041a6d
|
7
|
+
data.tar.gz: 2075af843b4a1043e6eaa2f68a09e3d02fcc1368c78a8cad830254fda5a6e014c384c61e5fa77b54a4a717a7b8507bed7fc878849ce1cfbe4fe2a137e4f7f7d2
|
@@ -0,0 +1,139 @@
|
|
1
|
+
version: 2
|
2
|
+
references:
|
3
|
+
repo_restore_cache: &repo_restore_cache
|
4
|
+
restore_cache:
|
5
|
+
keys:
|
6
|
+
- repo-{{ .Environment.CIRCLE_SHA1 }}
|
7
|
+
|
8
|
+
repo_save_cache: &repo_save_cache
|
9
|
+
save_cache:
|
10
|
+
key: repo-{{ .Environment.CIRCLE_SHA1 }}-{{ epoch }}
|
11
|
+
paths:
|
12
|
+
- ~/method_source
|
13
|
+
|
14
|
+
bundle_install: &bundle_install
|
15
|
+
run:
|
16
|
+
name: Install Bundler dependencies
|
17
|
+
command: bundle install --path ~/method_source/vendor/bundle --jobs 15
|
18
|
+
|
19
|
+
unit: &unit
|
20
|
+
run:
|
21
|
+
name: Run unit tests
|
22
|
+
command: bundle exec rake
|
23
|
+
|
24
|
+
jobs:
|
25
|
+
"ruby-1.9":
|
26
|
+
docker:
|
27
|
+
- image: kyrylo/ruby-1.9.3p551
|
28
|
+
working_directory: /home/circleci/method_source
|
29
|
+
steps:
|
30
|
+
- checkout
|
31
|
+
- <<: *repo_restore_cache
|
32
|
+
- <<: *bundle_install
|
33
|
+
- <<: *unit
|
34
|
+
"ruby-2.0":
|
35
|
+
docker:
|
36
|
+
- image: kyrylo/ruby-2.0.0p648
|
37
|
+
working_directory: /home/circleci/method_source
|
38
|
+
steps:
|
39
|
+
- checkout
|
40
|
+
- <<: *repo_restore_cache
|
41
|
+
- <<: *bundle_install
|
42
|
+
- <<: *unit
|
43
|
+
"ruby-2.1":
|
44
|
+
docker:
|
45
|
+
- image: circleci/ruby:2.1
|
46
|
+
working_directory: ~/method_source
|
47
|
+
steps:
|
48
|
+
- checkout
|
49
|
+
- <<: *repo_restore_cache
|
50
|
+
- <<: *bundle_install
|
51
|
+
- <<: *unit
|
52
|
+
"ruby-2.2":
|
53
|
+
docker:
|
54
|
+
- image: circleci/ruby:2.2
|
55
|
+
working_directory: ~/method_source
|
56
|
+
steps:
|
57
|
+
- checkout
|
58
|
+
- <<: *repo_restore_cache
|
59
|
+
- <<: *bundle_install
|
60
|
+
- <<: *unit
|
61
|
+
"ruby-2.3":
|
62
|
+
docker:
|
63
|
+
- image: circleci/ruby:2.3
|
64
|
+
working_directory: ~/method_source
|
65
|
+
steps:
|
66
|
+
- checkout
|
67
|
+
- <<: *repo_restore_cache
|
68
|
+
- <<: *bundle_install
|
69
|
+
- <<: *unit
|
70
|
+
"ruby-2.4":
|
71
|
+
docker:
|
72
|
+
- image: circleci/ruby:2.4
|
73
|
+
working_directory: ~/method_source
|
74
|
+
steps:
|
75
|
+
- checkout
|
76
|
+
- <<: *repo_restore_cache
|
77
|
+
- <<: *bundle_install
|
78
|
+
- <<: *unit
|
79
|
+
"ruby-2.5":
|
80
|
+
docker:
|
81
|
+
- image: circleci/ruby:2.5
|
82
|
+
working_directory: ~/method_source
|
83
|
+
steps:
|
84
|
+
- checkout
|
85
|
+
- <<: *repo_restore_cache
|
86
|
+
- <<: *bundle_install
|
87
|
+
- <<: *unit
|
88
|
+
"ruby-2.6":
|
89
|
+
docker:
|
90
|
+
- image: circleci/ruby:2.6
|
91
|
+
working_directory: ~/method_source
|
92
|
+
steps:
|
93
|
+
- checkout
|
94
|
+
- <<: *repo_restore_cache
|
95
|
+
- <<: *bundle_install
|
96
|
+
- <<: *unit
|
97
|
+
"ruby-2.7":
|
98
|
+
docker:
|
99
|
+
- image: circleci/ruby:2.7.0
|
100
|
+
working_directory: ~/method_source
|
101
|
+
steps:
|
102
|
+
- checkout
|
103
|
+
- <<: *repo_restore_cache
|
104
|
+
- <<: *bundle_install
|
105
|
+
- <<: *unit
|
106
|
+
"jruby-9.1-jdk":
|
107
|
+
docker:
|
108
|
+
- image: circleci/jruby:9.1-jdk
|
109
|
+
working_directory: ~/method_source
|
110
|
+
steps:
|
111
|
+
- checkout
|
112
|
+
- <<: *repo_restore_cache
|
113
|
+
- <<: *bundle_install
|
114
|
+
- <<: *unit
|
115
|
+
"jruby-9.2-jdk":
|
116
|
+
docker:
|
117
|
+
- image: circleci/jruby:9.2-jdk
|
118
|
+
working_directory: ~/method_source
|
119
|
+
steps:
|
120
|
+
- checkout
|
121
|
+
- <<: *repo_restore_cache
|
122
|
+
- <<: *bundle_install
|
123
|
+
- <<: *unit
|
124
|
+
|
125
|
+
workflows:
|
126
|
+
version: 2
|
127
|
+
build:
|
128
|
+
jobs:
|
129
|
+
- "ruby-1.9"
|
130
|
+
- "ruby-2.0"
|
131
|
+
- "ruby-2.1"
|
132
|
+
- "ruby-2.2"
|
133
|
+
- "ruby-2.3"
|
134
|
+
- "ruby-2.4"
|
135
|
+
- "ruby-2.5"
|
136
|
+
- "ruby-2.6"
|
137
|
+
- "ruby-2.7"
|
138
|
+
- "jruby-9.1-jdk"
|
139
|
+
- "jruby-9.2-jdk"
|
data/CHANGELOG.md
ADDED
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
method_source
|
1
|
+
method_source
|
2
2
|
=============
|
3
3
|
|
4
|
+
[](https://circleci.com/gh/banister/method_source)
|
5
|
+
|
4
6
|
(C) John Mair (banisterfiend) 2011
|
5
7
|
|
6
8
|
_retrieve the sourcecode for a method_
|
@@ -22,7 +24,7 @@ It is written in pure Ruby (no C).
|
|
22
24
|
`UnboundMethod` and `Proc` classes.
|
23
25
|
|
24
26
|
* Install the [gem](https://rubygems.org/gems/method_source): `gem install method_source`
|
25
|
-
* Read the [documentation](
|
27
|
+
* Read the [documentation](https://www.rubydoc.info/github/banister/method_source/master)
|
26
28
|
* See the [source code](http://github.com/banister/method_source)
|
27
29
|
|
28
30
|
Example: display method source
|
@@ -125,7 +125,7 @@ module MethodSource
|
|
125
125
|
GENERIC_REGEXPS = [
|
126
126
|
/unexpected (\$end|end-of-file|end-of-input|END_OF_FILE)/, # mri, jruby, ruby-2.0, ironruby
|
127
127
|
/embedded document meets end of file/, # =begin
|
128
|
-
/unterminated (quoted string|string|regexp) meets end of file/, # "quoted string" is ironruby
|
128
|
+
/unterminated (quoted string|string|regexp|list) meets end of file/, # "quoted string" is ironruby
|
129
129
|
/can't find string ".*" anywhere before EOF/, # rbx and jruby
|
130
130
|
/missing 'end' for/, /expecting kWHEN/ # rbx
|
131
131
|
]
|
data/method_source.gemspec
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: method_source 0.9.2 ruby lib
|
3
2
|
|
4
3
|
Gem::Specification.new do |s|
|
5
4
|
s.name = "method_source".freeze
|
6
|
-
s.version = "0.
|
5
|
+
s.version = "1.0.0"
|
7
6
|
|
8
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
8
|
s.require_paths = ["lib".freeze]
|
10
9
|
s.authors = ["John Mair (banisterfiend)".freeze]
|
11
|
-
s.date = "
|
10
|
+
s.date = "2020-03-19"
|
12
11
|
s.description = "retrieve the sourcecode for a method".freeze
|
13
12
|
s.email = "jrmair@gmail.com".freeze
|
14
|
-
s.files = [".gemtest".freeze, ".travis.yml".freeze, ".yardopts".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.markdown".freeze, "Rakefile".freeze, "lib/method_source.rb".freeze, "lib/method_source/code_helpers.rb".freeze, "lib/method_source/source_location.rb".freeze, "lib/method_source/version.rb".freeze, "method_source.gemspec".freeze, "spec/method_source/code_helpers_spec.rb".freeze, "spec/method_source_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
13
|
+
s.files = ["CHANGELOG.md".freeze, ".gemtest".freeze, ".travis.yml".freeze, ".yardopts".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.markdown".freeze, "Rakefile".freeze, "lib/method_source.rb".freeze, "lib/method_source/code_helpers.rb".freeze, "lib/method_source/source_location.rb".freeze, "lib/method_source/version.rb".freeze, "method_source.gemspec".freeze, "spec/method_source/code_helpers_spec.rb".freeze, "spec/method_source_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
15
14
|
s.homepage = "http://banisterfiend.wordpress.com".freeze
|
16
15
|
s.licenses = ["MIT".freeze]
|
17
|
-
s.rubygems_version = "2.7.6".freeze
|
18
16
|
s.summary = "retrieve the sourcecode for a method".freeze
|
19
17
|
s.test_files = ["spec/method_source/code_helpers_spec.rb".freeze, "spec/method_source_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
20
18
|
|
data/spec/method_source_spec.rb
CHANGED
@@ -33,7 +33,7 @@ describe MethodSource do
|
|
33
33
|
@lambda_source = "MyLambda = lambda { :lambda }\n"
|
34
34
|
@proc_source = "MyProc = Proc.new { :proc }\n"
|
35
35
|
@hello_instance_evaled_source = " def hello_\#{name}(*args)\n send_mesg(:\#{name}, *args)\n end\n"
|
36
|
-
@hello_instance_evaled_source_2 = " def \#{name}_two()\n if
|
36
|
+
@hello_instance_evaled_source_2 = " def \#{name}_two()\n if 40 + 4\n 45\n end\n end\n"
|
37
37
|
@hello_class_evaled_source = " def hello_\#{name}(*args)\n send_mesg(:\#{name}, *args)\n end\n"
|
38
38
|
@hi_module_evaled_source = " def hi_\#{name}\n @var = \#{name}\n end\n"
|
39
39
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: method_source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mair (banisterfiend)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,9 +44,10 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- ".circleci/config.yml"
|
47
48
|
- ".gemtest"
|
48
|
-
- ".travis.yml"
|
49
49
|
- ".yardopts"
|
50
|
+
- CHANGELOG.md
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE
|
52
53
|
- README.markdown
|
@@ -78,8 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
79
|
- !ruby/object:Gem::Version
|
79
80
|
version: '0'
|
80
81
|
requirements: []
|
81
|
-
|
82
|
-
rubygems_version: 2.6.13
|
82
|
+
rubygems_version: 3.1.2
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: retrieve the sourcecode for a method
|
data/.travis.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# To use rbx environment.
|
2
|
-
dist: trusty
|
3
|
-
bundler_args: "--verbose"
|
4
|
-
before_install:
|
5
|
-
- gem update --system
|
6
|
-
- which bundle || gem install bundler
|
7
|
-
- gem update bundler
|
8
|
-
rvm:
|
9
|
-
- 1.8.7
|
10
|
-
- 1.9.3
|
11
|
-
- ree
|
12
|
-
- rbx-3
|
13
|
-
- jruby
|
14
|
-
- jruby-head
|
15
|
-
- 2.0.0
|
16
|
-
- 2.1
|
17
|
-
- 2.2
|
18
|
-
- 2.3
|
19
|
-
- 2.4.2
|
20
|
-
- ruby-head
|
21
|
-
matrix:
|
22
|
-
allow_failures:
|
23
|
-
- rvm: ruby-head
|
24
|
-
- rvm: jruby
|
25
|
-
- rvm: jruby-head
|
26
|
-
- rvm: rbx-3
|
27
|
-
fast_finish: true
|
28
|
-
notifications:
|
29
|
-
irc: "irc.freenode.org#pry"
|
30
|
-
recipients:
|
31
|
-
- jrmair@gmail.com
|