my_timeline 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.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/README.markdown +11 -3
- data/app/helpers/my_timeline/application_helper.rb +23 -0
- data/app/views/my_timeline/events/index.html.erb +1 -1
- data/lib/my_timeline/version.rb +1 -1
- data/my_timeline.gemspec +1 -1
- data/spec/helpers/my_timeline/application_helper_spec.rb +37 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2df77b91d29892e17ed091a639c825a3cb09f37d
|
4
|
+
data.tar.gz: 814b2abfd44a8d3797cccf37ac6205b63864ae80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96eb8f589deb31056baeacecc5d58e3199cca404942b0d58a5464d1b6d6155fcde8c788956ef8d94c657dd19f96cf6daa5666d798582b29819dc3a46774db48e
|
7
|
+
data.tar.gz: d3bea660cda9ca41cfcdab852d4000ebcc83741270eeabd3e9eb36ac929cdc8db28b778ef169f42c17734e8364a003d2349404ce4e3639208f1680c57f76f0c5
|
data/.travis.yml
ADDED
data/README.markdown
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[](https://codeclimate.com/github/JustinAiken/my_timeline)
|
2
|
+
[](http://travis-ci.org/JustinAiken/my_timeline)
|
3
|
+
|
1
4
|
# My Timeline
|
2
5
|
#### A social-media aggregation/display plugin
|
3
6
|
|
@@ -6,7 +9,7 @@ The aggregated information is displayed in a unified timeline.
|
|
6
9
|
|
7
10
|
It is being developed with extensibility in mind - each service will have it's own plugin.
|
8
11
|
|
9
|
-
What it looks like:
|
12
|
+
### What it looks like:
|
10
13
|

|
11
14
|
|
12
15
|
### Requirements:
|
@@ -17,10 +20,14 @@ What it looks like:
|
|
17
20
|
### Supported services:
|
18
21
|
|
19
22
|
- [Runkeeper](https://github.com/JustinAiken/my_timeline-health_graph)
|
20
|
-
- [Twitter](https://github.com/JustinAiken/my_timeline-twitter)
|
21
|
-
- [Github](https://github.com/JustinAiken/my_timeline-github)
|
23
|
+
- [Twitter](https://github.com/JustinAiken/my_timeline-twitter)
|
24
|
+
- [Github](https://github.com/JustinAiken/my_timeline-github)
|
22
25
|
- If you develop another, let me know and I'll add it here!
|
23
26
|
|
27
|
+
### Demonstration
|
28
|
+
|
29
|
+
There is a [small demo app](https://github.com/JustinAiken/my_timeline-demo) available to show how it looks inside a fresh Rails application with a Devise User system.
|
30
|
+
|
24
31
|
### Usage:
|
25
32
|
|
26
33
|
1. Add the gem to your Gemfile: `gem 'my_timeline'` and `bundle install`
|
@@ -50,6 +57,7 @@ Original author: [Justin Aiken](https://github.com/JustinAiken)
|
|
50
57
|
|
51
58
|
* [Source](https://github.com/JustinAiken/my_timeline)
|
52
59
|
* [Bug Tracker](https://github.com/JustinAiken/my_timeline/issues)
|
60
|
+
* [Rubygem](https://rubygems.org/gems/my_timeline)
|
53
61
|
|
54
62
|
## Note on Patches/Pull Requests
|
55
63
|
|
@@ -1,4 +1,27 @@
|
|
1
1
|
module MyTimeline
|
2
2
|
module ApplicationHelper
|
3
|
+
def method_missing(meth, *args, &block)
|
4
|
+
if meth.to_s =~ /_path$|_url$/
|
5
|
+
if main_app.respond_to? meth
|
6
|
+
main_app.send meth, *args
|
7
|
+
else
|
8
|
+
super
|
9
|
+
end
|
10
|
+
else
|
11
|
+
super
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def respond_to?(meth)
|
16
|
+
if meth.to_s =~ /_path$|_url$/
|
17
|
+
if main_app.respond_to? meth
|
18
|
+
true
|
19
|
+
else
|
20
|
+
super
|
21
|
+
end
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
3
26
|
end
|
4
27
|
end
|
data/lib/my_timeline/version.rb
CHANGED
data/my_timeline.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
17
17
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
18
18
|
|
19
|
-
s.add_runtime_dependency "rails"
|
19
|
+
s.add_runtime_dependency "rails", ['>= 3.2', '< 4.0']
|
20
20
|
s.add_runtime_dependency "kaminari"
|
21
21
|
s.add_runtime_dependency 'ledermann-rails-settings'
|
22
22
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module MyTimeline
|
4
|
+
describe ApplicationHelper do
|
5
|
+
|
6
|
+
class HelperTester
|
7
|
+
include MyTimeline::ApplicationHelper
|
8
|
+
|
9
|
+
class MainApp
|
10
|
+
def self.bar_path
|
11
|
+
"/bar"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def main_app
|
16
|
+
MainApp
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
subject { HelperTester.new }
|
21
|
+
|
22
|
+
describe "#method_missing" do
|
23
|
+
|
24
|
+
it "with a non url/path method, herps and dies" do
|
25
|
+
expect { subject.foo_and_bar }.to raise_error NoMethodError
|
26
|
+
end
|
27
|
+
|
28
|
+
it "with a url/path method not found in the main app, herps and dies" do
|
29
|
+
expect { subject.foo_path }.to raise_error NoMethodError
|
30
|
+
end
|
31
|
+
|
32
|
+
it "passes a valid url/path method back to the main app" do
|
33
|
+
expect(subject.bar_path).to eq "/bar"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_timeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Aiken
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.2'
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '3.2'
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: kaminari
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +136,7 @@ extensions: []
|
|
130
136
|
extra_rdoc_files: []
|
131
137
|
files:
|
132
138
|
- .gitignore
|
139
|
+
- .travis.yml
|
133
140
|
- Gemfile
|
134
141
|
- Guardfile
|
135
142
|
- LICENSE
|
@@ -206,6 +213,7 @@ files:
|
|
206
213
|
- spec/dummy/public/favicon.ico
|
207
214
|
- spec/dummy/script/rails
|
208
215
|
- spec/factories/my_timeline_events.rb
|
216
|
+
- spec/helpers/my_timeline/application_helper_spec.rb
|
209
217
|
- spec/models/my_timeline/event_spec.rb
|
210
218
|
- spec/spec_helper.rb
|
211
219
|
- zeus.json
|