my_timeline 0.0.1 → 0.0.2

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: 714fab9ec169033025ebe673cbb873a04af8e902
4
- data.tar.gz: e5e3274ed45868c7e1eab12707639cb7325cf805
3
+ metadata.gz: 2df77b91d29892e17ed091a639c825a3cb09f37d
4
+ data.tar.gz: 814b2abfd44a8d3797cccf37ac6205b63864ae80
5
5
  SHA512:
6
- metadata.gz: 55574fd8ee63cf49e0987dc5a9930f1c55befed8831f7e866e2d64e1d331d93a06ebb6bfe609a1f809395ecb141bcc3dd974dab51d837ecdcd583fdd35b36662
7
- data.tar.gz: 215cd7b654f295ce7f6c11956494b4b3112fce5fbbbf363e0533b6821608cf0adc115bf84ba21765af3fdf4f6025ab363e83d553d789d4d5834a6a5e0c7aac3e
6
+ metadata.gz: 96eb8f589deb31056baeacecc5d58e3199cca404942b0d58a5464d1b6d6155fcde8c788956ef8d94c657dd19f96cf6daa5666d798582b29819dc3a46774db48e
7
+ data.tar.gz: d3bea660cda9ca41cfcdab852d4000ebcc83741270eeabd3e9eb36ac929cdc8db28b778ef169f42c17734e8364a003d2349404ce4e3639208f1680c57f76f0c5
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ env:
6
+ - DB=sqlite
7
+ script:
8
+ - RAILS_ENV=test bundle exec rake db:migrate
9
+ - bundle exec rake
10
+ before_script:
data/README.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ [![Code Climate](https://codeclimate.com/github/JustinAiken/my_timeline.png)](https://codeclimate.com/github/JustinAiken/my_timeline)
2
+ [![Build Status](https://secure.travis-ci.org/JustinAiken/my_timeline.png?branch=master)](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
  ![Screenshot](doc/screenshot.png)
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) - COMING SOON
21
- - [Github](https://github.com/JustinAiken/my_timeline-github) - COMING SOON
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
@@ -1,5 +1,5 @@
1
1
  <div class="page-header">
2
- <h1> Justin Aiken </h1><small>A demonstration timeline</small>
2
+ <small>A demonstration timeline</small>
3
3
  </div>
4
4
 
5
5
  <% @dates_with_events.each do |day| %>
@@ -1,3 +1,3 @@
1
1
  module MyTimeline
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-17 00:00:00.000000000 Z
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: '0'
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: '0'
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