annotate_gem 0.0.11 → 0.0.12

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: e19ea744fca0e12094d208b16959a8d80e343769
4
- data.tar.gz: 38bbd3f8c59b331f7346caac39d8420aa1680049
3
+ metadata.gz: 221ee1efe615b9d08342f4bebda6f9291b43a367
4
+ data.tar.gz: c836a268b5f2b66f24d8223f985e52b1dfa922d7
5
5
  SHA512:
6
- metadata.gz: d71370492e61059f406c03f527aa6512c09fa901ff273ca5a853f34cca6c7e6ba8345b4a2c237ae820e32996a194de42a2cf1e503050d3cdc130a1e484d101b1
7
- data.tar.gz: 1122146e16934a15a511cd0e072745bd68c52385d51083c33396697ad0cf1423204df64d0188ae1a5ebec5407b8590a73cd4c30ca2e8a502f24da5291f879fa7
6
+ metadata.gz: 9d942ff8449bb8cb7f0b9c62fd90080055c6804126e698536188bfe8d04e78de5af12f9da648302bcc613718e16735d217d3c25ccae6b615b3b7d6b312d7321b
7
+ data.tar.gz: d6ed4a336f2fdf8fbac4c54e41a4fcb829fc53c6d2b85f6ce299aa603090483096bb56306b178c513c3c644583632748182e0be809196ab9fa313810e76b6529
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/.travis.yml CHANGED
@@ -1,14 +1,18 @@
1
1
  language: ruby
2
- before_install: gem install bundler -v $BUNDLER_VERSION
2
+ before_install:
3
+ - find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete
4
+ - gem install bundler -v $BUNDLER_VERSION
3
5
  install: bundle _${BUNDLER_VERSION}_ install --jobs=3 --retry=3
4
6
  script: bundle _${BUNDLER_VERSION}_ exec rake test
5
7
  matrix:
6
8
  include:
9
+ - rvm: 2.5
10
+ env: BUNDLER_VERSION=1.16.1
11
+ - rvm: 2.4
12
+ env: BUNDLER_VERSION=1.16.1
7
13
  - rvm: 2.2
8
14
  env: BUNDLER_VERSION=1.12.1
9
15
  - rvm: 2.2
10
- env: BUNDLER_VERSION=1.5.3
11
- - rvm: 1.9
12
16
  env: BUNDLER_VERSION=1.12.1
13
- - rvm: 1.9
14
- env: BUNDLER_VERSION=1.5.3
17
+ - rvm: 2.0
18
+ env: BUNDLER_VERSION=1.12.1
data/Gemfile CHANGED
@@ -1,7 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in grub.gemspec
3
+ # Specify your gem's dependencies in annotate_gem.gemspec
4
4
  gemspec
5
5
 
6
+ # Fast debugging with Pry. (https://github.com/deivid-rodriguez/pry-byebug)
7
+ gem "pry-byebug", :platforms => "ruby_22"
8
+
6
9
  # An IRB alternative and runtime developer console (http://pryrepl.org)
7
10
  gem "pry"
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ annotate_gem (0.0.11)
5
+ bundler (~> 1.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ byebug (10.0.2)
11
+ coderay (1.1.2)
12
+ metaclass (0.0.4)
13
+ method_source (0.9.0)
14
+ minitest (5.11.3)
15
+ mocha (1.5.0)
16
+ metaclass (~> 0.0.1)
17
+ pry (0.11.3)
18
+ coderay (~> 1.1.0)
19
+ method_source (~> 0.9.0)
20
+ pry-byebug (3.6.0)
21
+ byebug (~> 10.0)
22
+ pry (~> 0.10)
23
+ rake (10.5.0)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ annotate_gem!
30
+ minitest (~> 5.0)
31
+ mocha (~> 1.1)
32
+ pry
33
+ pry-byebug
34
+ rake (~> 10.0)
35
+
36
+ BUNDLED WITH
37
+ 1.16.1
data/README.md CHANGED
@@ -47,7 +47,22 @@ source 'https://rubygems.org'
47
47
  gem "pry"
48
48
  ```
49
49
 
50
- `annotate-gem` has several options and you can see them via `annotate-gem -h`. `annotate-gem` also works with specifying a single gem name:
50
+ `annotate-gem` has several options:
51
+
52
+ ```
53
+ $ annotate_gem --help
54
+ Add comments to your Gemfile with each dependency's description.
55
+ Usage: annotate_gem [options]
56
+ annotate_gem [gem name]
57
+ --website-only Only output the website
58
+ --description-only Only output the description
59
+ --new-comments-only Only add a comment to gemfile if there isn't a comment already (for non-inline comments)
60
+ --inline Inline the comment
61
+ -h, --help Show this message
62
+ -v, --version Show version
63
+ ```
64
+
65
+ `annotate-gem` also works with specifying a single gem name:
51
66
 
52
67
  ```
53
68
  $ annotate-gem aasm
@@ -13,9 +13,10 @@ module AnnotateGem
13
13
  end
14
14
 
15
15
  def parse
16
- self.source = File.readlines(gemfile_path)
16
+ self.source = File.readlines(gemfile_path, :encoding => 'UTF-8')
17
17
  source.each_with_index do |line, i|
18
- if match = GEM_LINE_REGEX.match(line)
18
+ match = GEM_LINE_REGEX.match(line)
19
+ if match
19
20
  prev_line = source[i - 1] if i > 0
20
21
  prev_line_comment = prev_line if is_line_a_comment?(prev_line)
21
22
  self.gem_lines << GemLine.new(
@@ -1,4 +1,4 @@
1
1
  module AnnotateGem
2
- VERSION = "0.0.11".freeze
2
+ VERSION = "0.0.12".freeze
3
3
  DESCRIPTION = "Add comments to your Gemfile with each dependency's description.".freeze
4
4
  end
@@ -6,7 +6,7 @@ class AnnotateGem::CLITest < Minitest::Test
6
6
 
7
7
  def test_run_for_gemfile
8
8
  with_gemfile(File.read(gemfile_path)) do |path|
9
- Bundler.expects(:default_gemfile).returns(path)
9
+ Bundler.expects(:default_gemfile).returns(Pathname.new(path)).at_least_once
10
10
  out, _ = capture_io do
11
11
  AnnotateGem::CLI.new.run_for_gemfile
12
12
  end
@@ -36,6 +36,16 @@ class AnnotateGem::GemfileTest < Minitest::Test
36
36
  assert_equal 2, gemfile.gem_lines.length
37
37
  end
38
38
 
39
+ def test_parses_non_ascii_symbols
40
+ gemfile_content=unindent(<<-GEMFILE)
41
+ # Non ASCII 鋸 набор סמלים
42
+ GEMFILE
43
+
44
+ gemfile = gemfile_for(gemfile_content.force_encoding('ASCII'))
45
+
46
+ assert_equal 0, gemfile.gem_lines.length
47
+ end
48
+
39
49
  def test_write_comments
40
50
  with_gemfile("gem 'rails'") do |path|
41
51
  gemfile = AnnotateGem::Gemfile.new(path)
@@ -23,9 +23,20 @@ gem 'sdoc', '~> 0.4.0', group: :doc
23
23
  # Use Capistrano for deployment
24
24
  # gem 'capistrano-rails', group: :development
25
25
 
26
+ # Non ASCII 鋸 набор סמלים
27
+
28
+ gem 'nokogiri', '1.8.2'
29
+
26
30
  group :development, :test do
27
31
  gem 'byebug'
28
32
  gem 'web-console', '~> 2.0'
29
33
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
30
34
  gem 'spring'
31
35
  end
36
+
37
+ # test ruby code in Gemfile
38
+ if ENV['wisper']
39
+ gem 'wisper-activejob',
40
+ git: 'https://github.com/cambridgebrainsciences/wisper-activejob.git',
41
+ branch: 'rails5'
42
+ end
@@ -13,14 +13,14 @@ gem 'coffee-rails', '~> 4.1.0'
13
13
  # See https://github.com/rails/execjs#readme for more supported runtimes
14
14
  # gem 'therubyracer', platforms: :ruby
15
15
 
16
- # Use jQuery with Rails 4+ (http://rubygems.org/gems/jquery-rails)
16
+ # Use jQuery with Rails 4+ (https://github.com/rails/jquery-rails)
17
17
  gem 'jquery-rails'
18
- # Turbolinks makes navigating your web application faster (https://github.com/turbolinks/turbolinks-rails)
18
+ # Turbolinks makes navigating your web application faster (https://github.com/turbolinks/turbolinks)
19
19
  gem 'turbolinks'
20
20
  # Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder)
21
21
  gem 'jbuilder', '~> 2.0'
22
22
  # bundle exec rake doc:rails generates the API under doc/api.
23
- # rdoc html with javascript search index. (http://github.com/voloko/sdoc)
23
+ # rdoc html with javascript search index. (https://github.com/zzak/sdoc)
24
24
  gem 'sdoc', '~> 0.4.0', group: :doc
25
25
 
26
26
  # Use ActiveModel has_secure_password
@@ -32,8 +32,13 @@ gem 'sdoc', '~> 0.4.0', group: :doc
32
32
  # Use Capistrano for deployment
33
33
  # gem 'capistrano-rails', group: :development
34
34
 
35
+ # Non ASCII 鋸 набор סמלים
36
+
37
+ # Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser (http://nokogiri.org)
38
+ gem 'nokogiri', '1.8.2'
39
+
35
40
  group :development, :test do
36
- # Ruby 2.0 fast debugger - base + CLI (http://github.com/deivid-rodriguez/byebug)
41
+ # Ruby fast debugger - base + CLI (http://github.com/deivid-rodriguez/byebug)
37
42
  gem 'byebug'
38
43
  # A debugging tool for your Ruby on Rails applications. (https://github.com/rails/web-console)
39
44
  gem 'web-console', '~> 2.0'
@@ -41,3 +46,11 @@ group :development, :test do
41
46
  # Rails application preloader (https://github.com/rails/spring)
42
47
  gem 'spring'
43
48
  end
49
+
50
+ # test ruby code in Gemfile
51
+ if ENV['wisper']
52
+ # Provides Wisper with asynchronous event publishing using ActiveJob (https://github.com/krisleech/wisper-activejob)
53
+ gem 'wisper-activejob',
54
+ git: 'https://github.com/cambridgebrainsciences/wisper-activejob.git',
55
+ branch: 'rails5'
56
+ end
data/test/test_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "minitest/autorun"
2
- require "mocha/mini_test"
2
+ require "mocha/minitest"
3
3
  require "annotate_gem"
4
+ require "pry"
4
5
 
5
6
  module TestHelpers
6
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotate_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Tse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -79,6 +79,7 @@ files:
79
79
  - ".gitignore"
80
80
  - ".travis.yml"
81
81
  - Gemfile
82
+ - Gemfile.lock
82
83
  - LICENSE.txt
83
84
  - README.md
84
85
  - Rakefile
@@ -119,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  version: '0'
120
121
  requirements: []
121
122
  rubyforge_project:
122
- rubygems_version: 2.6.3
123
+ rubygems_version: 2.5.1
123
124
  signing_key:
124
125
  specification_version: 4
125
126
  summary: Add comments to your Gemfile with each dependency's description.