source_position 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -2
- data/lib/source_position.rb +1 -1
- data/lib/source_position/version.rb +1 -1
- data/spec/source_position_spec.rb +5 -0
- metadata +1 -1
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
|
data/lib/source_position.rb
CHANGED
@@ -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
|
|