method_source 0.9.0 → 1.0.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
- SHA1:
3
- metadata.gz: e1118a4c5ca09e1fc6975b68f403928990625f5f
4
- data.tar.gz: 300af8354d67837579d383bdc15459b1515421b1
2
+ SHA256:
3
+ metadata.gz: fe83abc213aa091b0cd4450c6c1d58bff6a9160aba41afc3641ef4424428d0eb
4
+ data.tar.gz: 46c108059ac1d6f7967c44e20104bfa5b95a4e15ba434ec007a7d3da4f268a9a
5
5
  SHA512:
6
- metadata.gz: eda821b401319fb84c65668d1e627e403315e67fa0932cf04cc6eda25ce032ed1fece20ccb4268568b1d56d1110373050281ae05f86894beeda2f47dd890e1a1
7
- data.tar.gz: 26d6010ff8487756651bf30e449d59fe1cf2729c778db676ce398cce1a6299ddc74c38305fd0b0ced24bd7b7cb7ad4806a3e20f992d58af1861021f6a9943fd6
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
@@ -0,0 +1,10 @@
1
+ method_source changelog
2
+ =======================
3
+
4
+ ### master
5
+
6
+ ### [v1.0.0][v1.0.0] (March 19, 2020)
7
+
8
+ * Added Ruby 2.7 support
9
+
10
+ [v1.0.0]: https://github.com/banister/method_source/releases/tag/v1.0.0
data/LICENSE CHANGED
@@ -1,7 +1,4 @@
1
- License
2
- -------
3
-
4
- (The MIT License)
1
+ MIT License
5
2
 
6
3
  Copyright (c) 2011 John Mair (banisterfiend)
7
4
 
data/README.markdown CHANGED
@@ -1,6 +1,8 @@
1
- method_source [![Build Status](https://travis-ci.org/banister/method_source.svg?branch=master)](https://travis-ci.org/banister/method_source)
1
+ method_source
2
2
  =============
3
3
 
4
+ [![Circle Build Status](https://circleci.com/gh/banister/method_source.svg?style=shield)](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](http://rdoc.info/github/banister/method_source/master/file/README.markdown)
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
data/Rakefile CHANGED
@@ -19,6 +19,7 @@ def apply_spec_defaults(s)
19
19
  s.email = 'jrmair@gmail.com'
20
20
  s.description = s.summary
21
21
  s.require_path = 'lib'
22
+ s.license = 'MIT'
22
23
 
23
24
  s.add_development_dependency("rspec","~>3.6")
24
25
  s.add_development_dependency("rake", "~>0.9")
@@ -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
  ]
@@ -1,3 +1,3 @@
1
1
  module MethodSource
2
- VERSION = "0.9.0"
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -1,34 +1,33 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = "method_source"
5
- s.version = "0.8.1"
4
+ s.name = "method_source".freeze
5
+ s.version = "1.0.0"
6
6
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["John Mair (banisterfiend)"]
9
- s.licenses = ['MIT']
10
- s.date = "2012-10-17"
11
- s.description = "retrieve the sourcecode for a method"
12
- s.email = "jrmair@gmail.com"
13
- s.files = [".gemtest", ".travis.yml", ".yardopts", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "lib/method_source.rb", "lib/method_source/code_helpers.rb", "lib/method_source/source_location.rb", "lib/method_source/version.rb", "method_source.gemspec", "spec/method_source/code_helpers_spec.rb", "spec/method_source_spec.rb", "spec/spec_helper.rb"]
14
- s.homepage = "http://banisterfiend.wordpress.com"
15
- s.require_paths = ["lib"]
16
- s.rubygems_version = "1.8.23"
17
- s.summary = "retrieve the sourcecode for a method"
18
- s.test_files = ["spec/method_source/code_helpers_spec.rb", "spec/method_source_spec.rb", "spec/spec_helper.rb"]
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
8
+ s.require_paths = ["lib".freeze]
9
+ s.authors = ["John Mair (banisterfiend)".freeze]
10
+ s.date = "2020-03-19"
11
+ s.description = "retrieve the sourcecode for a method".freeze
12
+ s.email = "jrmair@gmail.com".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]
14
+ s.homepage = "http://banisterfiend.wordpress.com".freeze
15
+ s.licenses = ["MIT".freeze]
16
+ s.summary = "retrieve the sourcecode for a method".freeze
17
+ s.test_files = ["spec/method_source/code_helpers_spec.rb".freeze, "spec/method_source_spec.rb".freeze, "spec/spec_helper.rb".freeze]
19
18
 
20
19
  if s.respond_to? :specification_version then
21
- s.specification_version = 3
20
+ s.specification_version = 4
22
21
 
23
22
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
- s.add_development_dependency(%q<rspec>, ["~> 3.6"])
25
- s.add_development_dependency(%q<rake>, ["~> 0.9"])
23
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.6"])
24
+ s.add_development_dependency(%q<rake>.freeze, ["~> 0.9"])
26
25
  else
27
- s.add_dependency(%q<rspec>, ["~> 3.6"])
28
- s.add_dependency(%q<rake>, ["~> 0.9"])
26
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.6"])
27
+ s.add_dependency(%q<rake>.freeze, ["~> 0.9"])
29
28
  end
30
29
  else
31
- s.add_dependency(%q<rspec>, ["~> 3.6"])
32
- s.add_dependency(%q<rake>, ["~> 0.9"])
30
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.6"])
31
+ s.add_dependency(%q<rake>.freeze, ["~> 0.9"])
33
32
  end
34
33
  end
@@ -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 44\n 45\n end\n end\n"
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
@@ -82,14 +82,14 @@ METHOD
82
82
  M.instance_eval <<EOF, __FILE__, __LINE__ + 1
83
83
 
84
84
  def #{name}_one()
85
- if 43
85
+ if 40 + 3
86
86
  44
87
87
  end
88
88
  end
89
89
 
90
90
 
91
91
  def #{name}_two()
92
- if 44
92
+ if 40 + 4
93
93
  45
94
94
  end
95
95
  end
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.9.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: 2017-09-26 00:00:00.000000000 Z
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
@@ -60,7 +61,8 @@ files:
60
61
  - spec/method_source_spec.rb
61
62
  - spec/spec_helper.rb
62
63
  homepage: http://banisterfiend.wordpress.com
63
- licenses: []
64
+ licenses:
65
+ - MIT
64
66
  metadata: {}
65
67
  post_install_message:
66
68
  rdoc_options: []
@@ -77,8 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
79
  - !ruby/object:Gem::Version
78
80
  version: '0'
79
81
  requirements: []
80
- rubyforge_project:
81
- rubygems_version: 2.6.12
82
+ rubygems_version: 3.1.2
82
83
  signing_key:
83
84
  specification_version: 4
84
85
  summary: retrieve the sourcecode for a method
data/.travis.yml DELETED
@@ -1,30 +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.1
20
- - ruby-head
21
- matrix:
22
- allow_failures:
23
- - rvm: ruby-head
24
- - rvm: jruby-head
25
- - rvm: rbx-3
26
- fast_finish: true
27
- notifications:
28
- irc: "irc.freenode.org#pry"
29
- recipients:
30
- - jrmair@gmail.com