hublot 0.0.1 → 0.0.5

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.
Files changed (80) hide show
  1. checksums.yaml +15 -0
  2. data/{LICENSE.txt → MIT-LICENSE} +2 -4
  3. data/README.rdoc +42 -0
  4. data/Rakefile +34 -1
  5. data/lib/hublot.rb +1 -1
  6. data/lib/hublot/pretty.rb +16 -16
  7. data/lib/hublot/rails.rb +9 -0
  8. data/lib/hublot/version.rb +2 -2
  9. data/lib/tasks/hublot_tasks.rake +4 -0
  10. data/test/dummy/Guardfile +24 -0
  11. data/test/dummy/Rakefile +7 -0
  12. data/test/dummy/app/assets/javascripts/application.js +15 -0
  13. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  14. data/test/dummy/app/controllers/application_controller.rb +3 -0
  15. data/test/dummy/app/helpers/application_helper.rb +2 -0
  16. data/test/dummy/app/models/comment.rb +7 -0
  17. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  18. data/test/dummy/config.ru +4 -0
  19. data/test/dummy/config/application.rb +59 -0
  20. data/test/dummy/config/boot.rb +10 -0
  21. data/test/dummy/config/database.yml +25 -0
  22. data/test/dummy/config/environment.rb +5 -0
  23. data/test/dummy/config/environments/development.rb +37 -0
  24. data/test/dummy/config/environments/production.rb +67 -0
  25. data/test/dummy/config/environments/test.rb +37 -0
  26. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  27. data/test/dummy/config/initializers/inflections.rb +15 -0
  28. data/test/dummy/config/initializers/mime_types.rb +5 -0
  29. data/test/dummy/config/initializers/secret_token.rb +7 -0
  30. data/test/dummy/config/initializers/session_store.rb +8 -0
  31. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  32. data/test/dummy/config/locales/en.yml +5 -0
  33. data/test/dummy/config/routes.rb +58 -0
  34. data/test/dummy/db/development.sqlite3 +0 -0
  35. data/test/dummy/db/migrate/20130715211742_create_comments.rb +9 -0
  36. data/test/dummy/db/schema.rb +22 -0
  37. data/test/dummy/db/test.sqlite3 +0 -0
  38. data/test/dummy/log/development.log +57 -0
  39. data/test/dummy/log/test.log +3069 -0
  40. data/test/dummy/public/404.html +26 -0
  41. data/test/dummy/public/422.html +26 -0
  42. data/test/dummy/public/500.html +25 -0
  43. data/test/dummy/public/favicon.ico +0 -0
  44. data/test/dummy/script/rails +6 -0
  45. data/test/dummy/spec/factories.rb +86 -0
  46. data/test/dummy/spec/features/hublot_prettifies_time_with_zone_spec.rb +83 -0
  47. data/test/dummy/spec/models/comment_spec.rb +73 -0
  48. data/test/dummy/spec/spec_helper.rb +38 -0
  49. data/test/dummy/test/fixtures/comments.yml +7 -0
  50. data/test/dummy/test/unit/comment_test.rb +7 -0
  51. data/test/dummy/tmp/rspec_guard_result +1 -0
  52. data/test/hublot_test.rb +7 -0
  53. data/test/test_helper.rb +15 -0
  54. metadata +131 -57
  55. data/.gitignore +0 -17
  56. data/.rspec +0 -1
  57. data/Gemfile +0 -9
  58. data/README.md +0 -50
  59. data/hublot.gemspec +0 -24
  60. data/lib/clock/clockmanifest.rb +0 -17
  61. data/lib/clock/friday.rb +0 -9
  62. data/lib/clock/last_friday.rb +0 -9
  63. data/lib/clock/last_monday.rb +0 -9
  64. data/lib/clock/last_saturday.rb +0 -9
  65. data/lib/clock/last_sunday.rb +0 -9
  66. data/lib/clock/last_thursday.rb +0 -9
  67. data/lib/clock/last_tuesday.rb +0 -9
  68. data/lib/clock/last_wednesday.rb +0 -9
  69. data/lib/clock/monday.rb +0 -9
  70. data/lib/clock/next_monday.rb +0 -9
  71. data/lib/clock/next_sunday.rb +0 -9
  72. data/lib/clock/saturday.rb +0 -9
  73. data/lib/clock/sunday.rb +0 -9
  74. data/lib/clock/thursday.rb +0 -9
  75. data/lib/clock/timepiece.rb +0 -15
  76. data/lib/clock/tuesday.rb +0 -9
  77. data/lib/clock/wednesday.rb +0 -9
  78. data/lib/example_objects/active_record_example.rb +0 -14
  79. data/spec/clock_spec.rb +0 -119
  80. data/spec/pretty_spec.rb +0 -77
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,86 @@
1
+ FactoryGirl.define do
2
+ factory :comment do
3
+ body "Hello World!"
4
+
5
+ trait :last_monday do
6
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 1, 20, 0, 58), Time.zone)
7
+ end
8
+
9
+ trait :last_tuesday do
10
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 2, 20, 0, 58), Time.zone)
11
+ end
12
+
13
+ trait :last_wednesday do
14
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 3, 20, 0, 58), Time.zone)
15
+ end
16
+
17
+ trait :last_thursday do
18
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 4, 20, 0, 58), Time.zone)
19
+ end
20
+
21
+ trait :last_friday do
22
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 5, 20, 0, 58), Time.zone)
23
+ end
24
+
25
+ trait :last_saturday do
26
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 6, 20, 0, 58), Time.zone)
27
+ end
28
+
29
+ trait :last_sunday do
30
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 7, 20, 0, 58), Time.zone)
31
+ end
32
+
33
+ trait :monday do
34
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 8, 20, 0, 58), Time.zone)
35
+ end
36
+
37
+ trait :tuesday do
38
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 9, 20, 0, 58), Time.zone)
39
+ end
40
+
41
+ trait :wednesday do
42
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 10, 20, 0, 58), Time.zone)
43
+ end
44
+
45
+ trait :thursday do
46
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 11, 20, 0, 58), Time.zone)
47
+ end
48
+
49
+ trait :friday do
50
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 12, 20, 0, 58), Time.zone)
51
+ end
52
+
53
+ trait :saturday do
54
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 13, 20, 0, 58), Time.zone)
55
+ end
56
+
57
+ trait :sunday do
58
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 14, 20, 0, 58), Time.zone)
59
+ end
60
+
61
+ trait :next_monday do
62
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 15, 20, 0, 58), Time.zone)
63
+ end
64
+
65
+ trait :next_sunday do
66
+ created_at ActiveSupport::TimeWithZone.new(DateTime.new(2013, 7, 21, 20, 0, 58), Time.zone)
67
+ end
68
+
69
+ factory :last_monday_comment, traits: [:last_monday]
70
+ factory :last_tuesday_comment, traits: [:last_tuesday]
71
+ factory :last_wednesday_comment, traits: [:last_wednesday]
72
+ factory :last_thursday_comment, traits: [:last_thursday]
73
+ factory :last_friday_comment, traits: [:last_friday]
74
+ factory :last_saturday_comment, traits: [:last_saturday]
75
+ factory :last_sunday_comment, traits: [:last_sunday]
76
+ factory :monday_comment, traits: [:monday]
77
+ factory :tuesday_comment, traits: [:tuesday]
78
+ factory :wednesday_comment, traits: [:wednesday]
79
+ factory :thursday_comment, traits: [:thursday]
80
+ factory :friday_comment, traits: [:friday]
81
+ factory :saturday_comment, traits: [:saturday]
82
+ factory :sunday_comment, traits: [:sunday]
83
+ factory :next_monday_comment, traits: [:next_monday]
84
+ factory :next_sunday_comment, traits: [:next_sunday]
85
+ end
86
+ end
@@ -0,0 +1,83 @@
1
+ require 'spec_helper'
2
+ require_relative '../../../../lib/hublot'
3
+
4
+ feature "hublot prettifies time with zone object", %q{
5
+ As a dev,
6
+ I want to include the gem Hublot, and call the pretty method on any of
7
+ my Active Record objects, and have it present a human-readable datetime.
8
+ } do
9
+
10
+ describe "#pretty" do
11
+ let(:comment) { FactoryGirl.create(:comment) }
12
+ let(:monday_comment) { FactoryGirl.create(:monday_comment) }
13
+ let(:tuesday_comment) { FactoryGirl.create(:tuesday_comment) }
14
+ let(:wednesday_comment) { FactoryGirl.create(:wednesday_comment) }
15
+ let(:sunday_comment) { FactoryGirl.create(:sunday_comment) }
16
+ let(:last_monday_comment) { FactoryGirl.create(:last_monday_comment) }
17
+ let(:next_monday_comment) { FactoryGirl.create(:next_monday_comment) }
18
+ let(:next_sunday_comment) { FactoryGirl.create(:next_sunday_comment) }
19
+
20
+ it "returns just now when the object was just created" do
21
+ expect(comment.created_at.pretty).to eql("just now")
22
+ end
23
+
24
+ it "returns just now when the object was just created" do
25
+ now = Time.now
26
+ comment.created_at = now - 1.second
27
+ expect(comment.created_at.pretty(now)).to eql("a second ago")
28
+ end
29
+
30
+ it "returns x seconds ago when it's been less than one minute since creation" do
31
+ comment.created_at = Time.now - 2.seconds
32
+ expect(comment.created_at.pretty).to eql("2 seconds ago")
33
+ comment.created_at = Time.now - 59.seconds
34
+ expect(comment.created_at.pretty).to eql("59 seconds ago")
35
+ end
36
+
37
+ it "returns x minutes ago when it's been less than one hour since creation" do
38
+ comment.created_at = Time.now - 1.minute
39
+ expect(comment.created_at.pretty).to eql("a minute ago")
40
+ comment.created_at = Time.now - 59.minutes
41
+ expect(comment.created_at.pretty).to eql("59 minutes ago")
42
+ end
43
+
44
+ it "returns an hour ago when it's been less than two hours since creation" do
45
+ comment.created_at = Time.now - 1.hour
46
+ expect(comment.created_at.pretty).to eql("an hour ago")
47
+ comment.created_at = Time.now - 2.hours + 1.second
48
+ expect(comment.created_at.pretty).to eql("an hour ago")
49
+ end
50
+
51
+ it "returns Today at time when it's been more than an hour, and it's still the same day" do
52
+ @distance = monday_comment.created_at + 2.hours
53
+ expect(monday_comment.created_at.pretty(@distance)).to eql("Today at 8:00PM")
54
+ end
55
+
56
+ it "returns Yesterday at time when it's been more than a day" do
57
+ @distance = tuesday_comment.created_at
58
+ expect(monday_comment.created_at.pretty(@distance)).to eql("Yesterday at 8:00PM")
59
+ end
60
+
61
+ it "returns the day of week at time when it's been more than two days and it's the same week" do
62
+ @distance = wednesday_comment.created_at
63
+ expect(monday_comment.created_at.pretty(@distance)).to eql("Monday at 8:00PM")
64
+ @distance = sunday_comment.created_at
65
+ expect(monday_comment.created_at.pretty(@distance)).to eql("Monday at 8:00PM")
66
+ end
67
+
68
+ it "returns last day_of_week at time when it's been more than one week" do
69
+ @distance = monday_comment.created_at
70
+ expect(last_monday_comment.created_at.pretty(@distance)).to eql("Last Monday at 8:00PM")
71
+ @distance = sunday_comment.created_at
72
+ expect(last_monday_comment.created_at.pretty(@distance)).to eql("Last Monday at 8:00PM")
73
+ end
74
+
75
+ it "returns a fully qualified datetime when it's been more than two weeks" do
76
+ @distance = next_monday_comment.created_at
77
+ expect(last_monday_comment.created_at.pretty(@distance)).to eql("Monday, July 1 at 8:00PM")
78
+ @distance = next_sunday_comment.created_at
79
+ expect(last_monday_comment.created_at.pretty(@distance)).to eql("Monday, July 1 at 8:00PM")
80
+ end
81
+ end
82
+ end
83
+
@@ -0,0 +1,73 @@
1
+ require 'spec_helper'
2
+
3
+ describe Comment do
4
+ let(:comment) { FactoryGirl.create(:comment) }
5
+
6
+ it "contains a body" do
7
+ expect(comment.body).to eql("Hello World!")
8
+ end
9
+
10
+ describe "#day_of_week" do
11
+ let(:monday_comment) { FactoryGirl.create(:monday_comment) }
12
+
13
+ it "returns the day of week of creation" do
14
+ expect(monday_comment.day_of_week).to eql("Monday")
15
+ end
16
+ end
17
+
18
+ describe "weekdays for feature testing" do
19
+ let(:last_monday_comment) { FactoryGirl.create(:last_monday_comment) }
20
+ let(:last_tuesday_comment) { FactoryGirl.create(:last_tuesday_comment) }
21
+ let(:last_wednesday_comment) { FactoryGirl.create(:last_wednesday_comment) }
22
+ let(:last_thursday_comment) { FactoryGirl.create(:last_thursday_comment) }
23
+ let(:last_friday_comment) { FactoryGirl.create(:last_friday_comment) }
24
+ let(:last_saturday_comment) { FactoryGirl.create(:last_saturday_comment) }
25
+ let(:last_sunday_comment) { FactoryGirl.create(:last_sunday_comment) }
26
+ let(:monday_comment) { FactoryGirl.create(:monday_comment) }
27
+ let(:tuesday_comment) { FactoryGirl.create(:tuesday_comment) }
28
+ let(:wednesday_comment) { FactoryGirl.create(:wednesday_comment) }
29
+ let(:thursday_comment) { FactoryGirl.create(:thursday_comment) }
30
+ let(:friday_comment) { FactoryGirl.create(:friday_comment) }
31
+ let(:saturday_comment) { FactoryGirl.create(:saturday_comment) }
32
+ let(:sunday_comment) { FactoryGirl.create(:sunday_comment) }
33
+ let(:next_monday_comment) { FactoryGirl.create(:next_monday_comment) }
34
+ let(:next_sunday_comment) { FactoryGirl.create(:next_sunday_comment) }
35
+
36
+ it "returns Monday" do
37
+ expect(last_monday_comment.day_of_week).to eql("Monday")
38
+ expect(next_monday_comment.day_of_week).to eql("Monday")
39
+ end
40
+
41
+ it "returns Tuesday" do
42
+ expect(last_tuesday_comment.day_of_week).to eql("Tuesday")
43
+ expect(tuesday_comment.day_of_week).to eql("Tuesday")
44
+ end
45
+
46
+ it "returns Wednesday" do
47
+ expect(last_wednesday_comment.day_of_week).to eql("Wednesday")
48
+ expect(wednesday_comment.day_of_week).to eql("Wednesday")
49
+ end
50
+
51
+ it "returns Thursday" do
52
+ expect(last_thursday_comment.day_of_week).to eql("Thursday")
53
+ expect(thursday_comment.day_of_week).to eql("Thursday")
54
+ end
55
+
56
+ it "returns Friday" do
57
+ expect(last_friday_comment.day_of_week).to eql("Friday")
58
+ expect(friday_comment.day_of_week).to eql("Friday")
59
+ end
60
+
61
+ it "returns Saturday" do
62
+ expect(last_saturday_comment.day_of_week).to eql("Saturday")
63
+ expect(saturday_comment.day_of_week).to eql("Saturday")
64
+ end
65
+
66
+ it "returns Sunday" do
67
+ expect(last_sunday_comment.day_of_week).to eql("Sunday")
68
+ expect(sunday_comment.day_of_week).to eql("Sunday")
69
+ expect(next_sunday_comment.day_of_week).to eql("Sunday")
70
+ end
71
+
72
+ end
73
+ end
@@ -0,0 +1,38 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ # Requires supporting ruby files with custom matchers and macros, etc,
8
+ # in spec/support/ and its subdirectories.
9
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10
+
11
+ RSpec.configure do |config|
12
+ # ## Mock Framework
13
+ #
14
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
15
+ #
16
+ # config.mock_with :mocha
17
+ # config.mock_with :flexmock
18
+ # config.mock_with :rr
19
+
20
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
21
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
22
+
23
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
24
+ # examples within a transaction, remove the following line or assign false
25
+ # instead of true.
26
+ config.use_transactional_fixtures = true
27
+
28
+ # If true, the base class of anonymous controllers will be inferred
29
+ # automatically. This will be the default behavior in future versions of
30
+ # rspec-rails.
31
+ config.infer_base_class_for_anonymous_controllers = false
32
+
33
+ # Run specs in random order to surface order dependencies. If you find an
34
+ # order dependency and want to debug it, you can fix the order by providing
35
+ # the seed, which is printed after each run.
36
+ # --seed 1234
37
+ config.order = "random"
38
+ end
@@ -0,0 +1,7 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ body: MyText
5
+
6
+ two:
7
+ body: MyText
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class CommentTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class HublotTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, Hublot
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
metadata CHANGED
@@ -1,20 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hublot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brett Shollenberger
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-09 00:00:00.000000000 Z
11
+ date: 2013-07-16 00:00:00.000000000 Z
13
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>'
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>'
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
14
41
  - !ruby/object:Gem::Dependency
15
42
  name: rspec
16
43
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
44
  requirements:
19
45
  - - ! '>='
20
46
  - !ruby/object:Gem::Version
@@ -22,15 +48,13 @@ dependencies:
22
48
  type: :development
23
49
  prerelease: false
24
50
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
51
  requirements:
27
52
  - - ! '>='
28
53
  - !ruby/object:Gem::Version
29
54
  version: '0'
30
55
  - !ruby/object:Gem::Dependency
31
- name: active_support
56
+ name: activesupport
32
57
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
58
  requirements:
35
59
  - - ! '>='
36
60
  - !ruby/object:Gem::Version
@@ -38,7 +62,6 @@ dependencies:
38
62
  type: :development
39
63
  prerelease: false
40
64
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
65
  requirements:
43
66
  - - ! '>='
44
67
  - !ruby/object:Gem::Version
@@ -46,7 +69,6 @@ dependencies:
46
69
  - !ruby/object:Gem::Dependency
47
70
  name: i18n
48
71
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
72
  requirements:
51
73
  - - ! '>='
52
74
  - !ruby/object:Gem::Version
@@ -54,7 +76,6 @@ dependencies:
54
76
  type: :development
55
77
  prerelease: false
56
78
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
79
  requirements:
59
80
  - - ! '>='
60
81
  - !ruby/object:Gem::Version
@@ -62,7 +83,6 @@ dependencies:
62
83
  - !ruby/object:Gem::Dependency
63
84
  name: rake
64
85
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
86
  requirements:
67
87
  - - ! '>='
68
88
  - !ruby/object:Gem::Version
@@ -70,80 +90,134 @@ dependencies:
70
90
  type: :development
71
91
  prerelease: false
72
92
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
93
  requirements:
75
94
  - - ! '>='
76
95
  - !ruby/object:Gem::Version
77
96
  version: '0'
78
- description: Date-sensitive humanized datetim
97
+ description: Humanizes datetime for Active Record objects.
79
98
  email:
80
99
  - brett.shollenberger@gmail.com
81
100
  executables: []
82
101
  extensions: []
83
102
  extra_rdoc_files: []
84
103
  files:
85
- - .gitignore
86
- - .rspec
87
- - Gemfile
88
- - LICENSE.txt
89
- - README.md
90
- - Rakefile
91
- - hublot.gemspec
92
- - lib/clock/clockmanifest.rb
93
- - lib/clock/friday.rb
94
- - lib/clock/last_friday.rb
95
- - lib/clock/last_monday.rb
96
- - lib/clock/last_saturday.rb
97
- - lib/clock/last_sunday.rb
98
- - lib/clock/last_thursday.rb
99
- - lib/clock/last_tuesday.rb
100
- - lib/clock/last_wednesday.rb
101
- - lib/clock/monday.rb
102
- - lib/clock/next_monday.rb
103
- - lib/clock/next_sunday.rb
104
- - lib/clock/saturday.rb
105
- - lib/clock/sunday.rb
106
- - lib/clock/thursday.rb
107
- - lib/clock/timepiece.rb
108
- - lib/clock/tuesday.rb
109
- - lib/clock/wednesday.rb
110
- - lib/example_objects/active_record_example.rb
111
- - lib/hublot.rb
112
104
  - lib/hublot/pretty.rb
105
+ - lib/hublot/rails.rb
113
106
  - lib/hublot/version.rb
114
- - spec/clock_spec.rb
115
- - spec/pretty_spec.rb
116
- homepage: ''
107
+ - lib/hublot.rb
108
+ - lib/tasks/hublot_tasks.rake
109
+ - MIT-LICENSE
110
+ - Rakefile
111
+ - README.rdoc
112
+ - test/dummy/app/assets/javascripts/application.js
113
+ - test/dummy/app/assets/stylesheets/application.css
114
+ - test/dummy/app/controllers/application_controller.rb
115
+ - test/dummy/app/helpers/application_helper.rb
116
+ - test/dummy/app/models/comment.rb
117
+ - test/dummy/app/views/layouts/application.html.erb
118
+ - test/dummy/config/application.rb
119
+ - test/dummy/config/boot.rb
120
+ - test/dummy/config/database.yml
121
+ - test/dummy/config/environment.rb
122
+ - test/dummy/config/environments/development.rb
123
+ - test/dummy/config/environments/production.rb
124
+ - test/dummy/config/environments/test.rb
125
+ - test/dummy/config/initializers/backtrace_silencers.rb
126
+ - test/dummy/config/initializers/inflections.rb
127
+ - test/dummy/config/initializers/mime_types.rb
128
+ - test/dummy/config/initializers/secret_token.rb
129
+ - test/dummy/config/initializers/session_store.rb
130
+ - test/dummy/config/initializers/wrap_parameters.rb
131
+ - test/dummy/config/locales/en.yml
132
+ - test/dummy/config/routes.rb
133
+ - test/dummy/config.ru
134
+ - test/dummy/db/development.sqlite3
135
+ - test/dummy/db/migrate/20130715211742_create_comments.rb
136
+ - test/dummy/db/schema.rb
137
+ - test/dummy/db/test.sqlite3
138
+ - test/dummy/Guardfile
139
+ - test/dummy/log/development.log
140
+ - test/dummy/log/test.log
141
+ - test/dummy/public/404.html
142
+ - test/dummy/public/422.html
143
+ - test/dummy/public/500.html
144
+ - test/dummy/public/favicon.ico
145
+ - test/dummy/Rakefile
146
+ - test/dummy/script/rails
147
+ - test/dummy/spec/factories.rb
148
+ - test/dummy/spec/features/hublot_prettifies_time_with_zone_spec.rb
149
+ - test/dummy/spec/models/comment_spec.rb
150
+ - test/dummy/spec/spec_helper.rb
151
+ - test/dummy/test/fixtures/comments.yml
152
+ - test/dummy/test/unit/comment_test.rb
153
+ - test/dummy/tmp/rspec_guard_result
154
+ - test/hublot_test.rb
155
+ - test/test_helper.rb
156
+ homepage: http://github.com/brettshollenberger/hublot
117
157
  licenses: []
158
+ metadata: {}
118
159
  post_install_message:
119
160
  rdoc_options: []
120
161
  require_paths:
121
162
  - lib
122
163
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
164
  requirements:
125
165
  - - ! '>='
126
166
  - !ruby/object:Gem::Version
127
167
  version: '0'
128
- segments:
129
- - 0
130
- hash: 2396956993484912416
131
168
  required_rubygems_version: !ruby/object:Gem::Requirement
132
- none: false
133
169
  requirements:
134
170
  - - ! '>='
135
171
  - !ruby/object:Gem::Version
136
172
  version: '0'
137
- segments:
138
- - 0
139
- hash: 2396956993484912416
140
173
  requirements: []
141
174
  rubyforge_project:
142
- rubygems_version: 1.8.25
175
+ rubygems_version: 2.0.5
143
176
  signing_key:
144
- specification_version: 3
145
- summary: Include hublot inside any class that includes a created_at attribute, and
146
- call the pretty method on that object to return context-sensitive datetime.
177
+ specification_version: 4
178
+ summary: Adds datetime humanization to Active Record objects.
147
179
  test_files:
148
- - spec/clock_spec.rb
149
- - spec/pretty_spec.rb
180
+ - test/dummy/app/assets/javascripts/application.js
181
+ - test/dummy/app/assets/stylesheets/application.css
182
+ - test/dummy/app/controllers/application_controller.rb
183
+ - test/dummy/app/helpers/application_helper.rb
184
+ - test/dummy/app/models/comment.rb
185
+ - test/dummy/app/views/layouts/application.html.erb
186
+ - test/dummy/config/application.rb
187
+ - test/dummy/config/boot.rb
188
+ - test/dummy/config/database.yml
189
+ - test/dummy/config/environment.rb
190
+ - test/dummy/config/environments/development.rb
191
+ - test/dummy/config/environments/production.rb
192
+ - test/dummy/config/environments/test.rb
193
+ - test/dummy/config/initializers/backtrace_silencers.rb
194
+ - test/dummy/config/initializers/inflections.rb
195
+ - test/dummy/config/initializers/mime_types.rb
196
+ - test/dummy/config/initializers/secret_token.rb
197
+ - test/dummy/config/initializers/session_store.rb
198
+ - test/dummy/config/initializers/wrap_parameters.rb
199
+ - test/dummy/config/locales/en.yml
200
+ - test/dummy/config/routes.rb
201
+ - test/dummy/config.ru
202
+ - test/dummy/db/development.sqlite3
203
+ - test/dummy/db/migrate/20130715211742_create_comments.rb
204
+ - test/dummy/db/schema.rb
205
+ - test/dummy/db/test.sqlite3
206
+ - test/dummy/Guardfile
207
+ - test/dummy/log/development.log
208
+ - test/dummy/log/test.log
209
+ - test/dummy/public/404.html
210
+ - test/dummy/public/422.html
211
+ - test/dummy/public/500.html
212
+ - test/dummy/public/favicon.ico
213
+ - test/dummy/Rakefile
214
+ - test/dummy/script/rails
215
+ - test/dummy/spec/factories.rb
216
+ - test/dummy/spec/features/hublot_prettifies_time_with_zone_spec.rb
217
+ - test/dummy/spec/models/comment_spec.rb
218
+ - test/dummy/spec/spec_helper.rb
219
+ - test/dummy/test/fixtures/comments.yml
220
+ - test/dummy/test/unit/comment_test.rb
221
+ - test/dummy/tmp/rspec_guard_result
222
+ - test/hublot_test.rb
223
+ - test/test_helper.rb