gemologist 0.1.1 → 0.2.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
2
  SHA1:
3
- metadata.gz: a12b87202602389c1ae218576441797883913da3
4
- data.tar.gz: 826f209a4237d41224949861b05e958b5a833af9
3
+ metadata.gz: e2ee32c1cfafab16ff4566e0ef7c612f98b76924
4
+ data.tar.gz: d5f0b23dbf4d6fd1ba9cbf7f3a4ac0c2c392547a
5
5
  SHA512:
6
- metadata.gz: 7fe03cd6eebcdf2f28d692b1f3e6d35246c923031c0331474217cab626f437387c5bee63bc1e8391aaa9ed273119dbfb262b6fec979162a0c3daad2b26845d7e
7
- data.tar.gz: e048dd055c70cabd91b16320a3fcec21b2264a03300de73e17c351793bb98eb543d9bcb9f61739d24e21b62a9bb4d1e5cdd74393dec8673d8afe9b4f38d0e4b8
6
+ metadata.gz: 5a3a26ac9e75ad9ee5927a29e20b9a27d8a2b1092d09e6fde5a503af1380846c6512749639c93d6aa6c920722db28c1989fd6877a328a73c5cf99aecb4c52eb4
7
+ data.tar.gz: 52579241d491310dfa9a68102b632f7797bb8cb23d76c23bcf145f3cca92a87e2528727ce57c85214d0cf0361d8f71dc0859c9cabbf86a53f9a948d3f835bc28
@@ -5,6 +5,10 @@ rvm:
5
5
  - 2.1
6
6
  - 2.2
7
7
  - ruby-head
8
+ matrix:
9
+ allow_failures:
10
+ - rvm:
11
+ - ruby-head
8
12
  script: bundle exec rake ci
9
13
  sudo: false
10
14
  cache: bundler
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Development
4
4
 
5
+ ## v0.2.0
6
+
7
+ * Deprecate `AbstractGemfile#rewrite!` in favor of `#save`.
8
+
5
9
  ## v0.1.1
6
10
 
7
11
  * Support Ruby 1.9.3.
@@ -1,3 +1,4 @@
1
+ require 'gemologist/ui'
1
2
  require 'astrolabe/builder'
2
3
  require 'parser/current'
3
4
 
@@ -20,11 +21,16 @@ module Gemologist
20
21
  end
21
22
  end
22
23
 
23
- def rewrite!
24
+ def save
24
25
  rewritten_source = source_rewriter.process
25
26
  File.write(path, rewritten_source)
26
27
  end
27
28
 
29
+ def rewrite!
30
+ Gemologist::UI.deprecate("#{self.class.name}##{__method__}", replacement: '#save')
31
+ save
32
+ end
33
+
28
34
  private
29
35
 
30
36
  def dependency_class
@@ -1,3 +1,5 @@
1
+ require 'bundler'
2
+
1
3
  module Gemologist
2
4
  class GemfileLock
3
5
  attr_reader :path
@@ -0,0 +1,11 @@
1
+ module Gemologist
2
+ module UI
3
+ module_function
4
+
5
+ def deprecate(deprecated, options = {})
6
+ message = "DEPRECATION: #{deprecated} is deprecated."
7
+ message << " Use #{options[:replacement]} instead." if options[:replacement]
8
+ warn message
9
+ end
10
+ end
11
+ end
@@ -2,8 +2,8 @@ module Gemologist
2
2
  # http://semver.org/
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 1
6
- PATCH = 1
5
+ MINOR = 2
6
+ PATCH = 0
7
7
 
8
8
  def self.to_s
9
9
  [MAJOR, MINOR, PATCH].join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemologist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Nakayama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-18 00:00:00.000000000 Z
11
+ date: 2015-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,6 +53,7 @@ files:
53
53
  - lib/gemologist/gemspec.rb
54
54
  - lib/gemologist/gemspec/dependency.rb
55
55
  - lib/gemologist/runtime_value.rb
56
+ - lib/gemologist/ui.rb
56
57
  - lib/gemologist/util.rb
57
58
  - lib/gemologist/version.rb
58
59
  homepage: https://github.com/yujinakayama/gemologist