source_position 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Editor friendly source location
4
4
 
5
- Works with ruby 1.9
6
-
7
5
  ## Installation
8
6
 
7
+ Ruby 1.8 user, please Install [ruby18_source_location] first.
8
+
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  gem 'source_position'
@@ -50,3 +50,5 @@ line 4.
50
50
  3. Commit your changes (`git commit -am 'Added some feature'`)
51
51
  4. Push to the branch (`git push origin my-new-feature`)
52
52
  5. Create new Pull Request
53
+
54
+ [ruby18_source_location]: https://github.com/ConradIrwin/ruby18_source_location
@@ -2,7 +2,7 @@ require "source_position/version"
2
2
 
3
3
  module SourcePosition
4
4
  def source_position
5
- self.source_location.join(':')
5
+ self.source_location.join(':') if self.source_location
6
6
  end
7
7
  end
8
8
 
@@ -1,3 +1,3 @@
1
1
  module SourcePosition
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -11,5 +11,10 @@ describe SourcePosition do
11
11
  subject { Dummy.method(:foobar) }
12
12
 
13
13
  its(:source_position) { should eq "#{Dir.pwd}/spec/source_position_spec.rb:5"}
14
+
15
+ context 'source_location returns nil value' do
16
+ subject { Object.method(:to_s) }
17
+ its(:source_position) { should eq nil }
18
+ end
14
19
  end
15
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_position
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: