rubyXL-addressing 0.2.0 → 0.3.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: 0631645fffcb1b80f72b10339b3150d1e1b5e187
4
- data.tar.gz: e66ca645218f47ace24fa1341205807f68ecf9e9
3
+ metadata.gz: 366a2c486d1f03f243734f41717c5ead0f479df6
4
+ data.tar.gz: fab7783dec00ce4309892f36cffb668101741eba
5
5
  SHA512:
6
- metadata.gz: 37ce540e93dda95bc1f9faef6f36b1214bbb817d74c92de09fb12184ad0e0cbb139026c92c5331e3d197a25d4f26f7d5d0d3651a0a6c0119738b2721b222dcbf
7
- data.tar.gz: a4b54aa278663be11b1ca8aa356431da95aed9db3f933262b102181d248154e3d1a0059c48845169bb55e408e4646115463151e11661a844d61dcfce5591120d
6
+ metadata.gz: c8291d02ca52a48f944f33aa57dcd20071c07e4e34c05b7fcb3f24bfdc513e23d3b2c9477a3f4fede4989118af8c85522d0b30772605b45d89c151d3629934df
7
+ data.tar.gz: 9f0ee399e07d073cd0b81246752a19018e31db311041476aa69a17a77a5255f32785b74220b4677e835355c41bc423f9cc365ce451977d7b00fd2341a2b13f70
data/.hound.yml ADDED
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ AllCops:
4
4
  - Appraisals
5
5
  - Gemfile
6
6
  - Rakefile
7
- TargetRubyVersion: 2.1
7
+ TargetRubyVersion: 2.3
8
8
 
9
9
  Metrics/AbcSize:
10
10
  Exclude:
@@ -29,11 +29,6 @@ Style/ClassVars:
29
29
  Style/Documentation:
30
30
  Enabled: false
31
31
 
32
- # does not consider `frozen_string_literal: true`
33
- Style/MutableConstant:
34
- Exclude:
35
- - lib/rubyXL/addressing/version.rb
36
-
37
32
  Style/TrailingCommaInLiteral:
38
33
  EnforcedStyleForMultiline: comma
39
34
 
data/Appraisals CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  %w(
2
4
  2.1.1
3
5
  2.5.7
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in rubyXL-addressing.gemspec
data/README.md CHANGED
@@ -48,7 +48,7 @@ end
48
48
  ```ruby
49
49
  c3 = worksheet.addr(:C3)
50
50
  f3 = c3.column(:F) # or c3.right(3)
51
- if c3.cell && f3.cell # or c3.exists?
51
+ if c3.cell && f3.cell
52
52
  c3.value + f3.value
53
53
  end
54
54
  ```
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
  require 'appraisal'
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'rubyXL/addressing'
@@ -51,13 +51,13 @@ module RubyXL
51
51
  # @param [Integer, String, Symbol] row
52
52
  # @return [Integer, String, Symbol]
53
53
  def row=(row)
54
- @row = Addressing.__send__(:normalize, 'row', row)
54
+ @row = Addressing.__send__(:normalize, :row, row)
55
55
  end
56
56
 
57
57
  # @param [Integer, String, Symbol] column
58
58
  # @return [Integer, String, Symbol]
59
59
  def column=(column)
60
- @column = Addressing.__send__(:normalize, 'column', column)
60
+ @column = Addressing.__send__(:normalize, :column, column)
61
61
  end
62
62
 
63
63
  # @return [String]
@@ -127,11 +127,6 @@ module RubyXL
127
127
  (row = @worksheet[@row]) && row[@column]
128
128
  end
129
129
 
130
- # @return [Boolean]
131
- def exists?
132
- !cell.nil?
133
- end
134
-
135
130
  # @return [Object]
136
131
  def value
137
132
  cell && cell.value
@@ -14,7 +14,7 @@ module RubyXL
14
14
  # @param [Integer] ind
15
15
  # @return [String]
16
16
  def row_ind2ref(ind)
17
- validate_index('row', ind)
17
+ validate_index(:row, ind)
18
18
 
19
19
  (ind + 1).to_s.freeze
20
20
  end
@@ -22,7 +22,7 @@ module RubyXL
22
22
  # @param [Integer] ind
23
23
  # @return [String]
24
24
  def column_ind2ref(ind)
25
- validate_index('column', ind)
25
+ validate_index(:column, ind)
26
26
 
27
27
  ref = ''.dup
28
28
  loop do
@@ -85,5 +85,5 @@ module RubyXL
85
85
  end
86
86
  end
87
87
 
88
- Worksheet.prepend(Addressing)
88
+ Worksheet.include(Addressing)
89
89
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyXL
4
4
  module Addressing
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyXL-addressing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Takeuchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyXL
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".gitignore"
105
+ - ".hound.yml"
105
106
  - ".rubocop.yml"
106
107
  - ".travis.yml"
107
108
  - Appraisals