trice 0.1.0 → 0.1.1

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: a8941c189a7c1758706c4f3b6b1a6c89b223e3ea
4
- data.tar.gz: 980ad43b5c5df52c0ad1023623237cf268f10d88
3
+ metadata.gz: 25190dbc72f712963bc37e9ee966324a5e19b342
4
+ data.tar.gz: 701949aedd85f646106c34e2f89193b8af07bed1
5
5
  SHA512:
6
- metadata.gz: b74981f6f7da1ba1d29ff3b0e85148e5086d1ba03983cddcfeed7412b4bbf3094f387ffa0dbb265fe238f442949ee1d4b3ae0203654e5cbd61c3e277845064b0
7
- data.tar.gz: 0b2c51d25d9927fbd22d141bb3da90e6e24f1c384e4fcf9aad1e79211ffcc0c0b3b9b43364b97182145d934b81e64ea825af56d2631a9a7a04705bb04052fdd0
6
+ metadata.gz: 06408004d555c84c628e40ec675b1a693bb8f54b0f2914b361fa5c31ab8415a1f03c873e5e4d8f829d831194814109c0114e01e74cbdcb0accf0a84a707265b6
7
+ data.tar.gz: 45b39aaf7bd9f5a33a1b082a03b266feefcd24ded644c2689bc7eb6befe7aaf8d60d9ad2944e384775f52fac5385988b3bdd2ff274e4d139cd6124339cc52f88
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Cookpad Inc.
3
+ Copyright (c) 2016 Kyosuke MOROHASHI, Cookpad Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -99,7 +99,7 @@ Value format, which specified both query parameter and header, should be `Time.p
99
99
  Toggle requested at stubbing in `config/initializers`. The default is below, enabled unelss `Rails.env.production?`.
100
100
 
101
101
  ```ruby
102
- Trice.support_performing_at_stubbing = !Rails.env.production?
102
+ Trice.support_requested_at_stubbing = !Rails.env.production?
103
103
  ```
104
104
 
105
105
  Setting callable object let you choice enable/disable dinamically by seeing request.
@@ -107,7 +107,7 @@ Setting callable object let you choice enable/disable dinamically by seeing requ
107
107
  ```ruby
108
108
  our_office_network = IPAddr.new('203.0.113.0/24')
109
109
 
110
- Trice.support_performing_at_stubbing = ->(controller) {
110
+ Trice.support_requested_at_stubbing = ->(controller) {
111
111
  next true unless Rails.env.production?
112
112
 
113
113
  our_office_network.include?(controller.request.remote_ip)
@@ -124,7 +124,7 @@ RSpec.configure do |config|
124
124
  end
125
125
  ```
126
126
 
127
- I recommend to pass reference time to a modle by method and/or constructor argument because reference time is an external input, should be handled controller layer.
127
+ I recommend to pass reference time to a model by method and/or constructor argument because reference time is an external input, should be handled controller layer.
128
128
  But sometimes it is required from deep inside of model logics and tests for them.
129
129
 
130
130
  Model unit spec has `with_refrence_time` and `set_now_to_reference_time` declarition method to set `Trice.reference_time` in an example.
data/lib/trice/railtie.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  module Trice
2
2
  class Railtie < ::Rails::Railtie
3
3
  initializer 'trice' do |app|
4
- Trice.support_requested_at_stubbing = !Rails.env.production?
4
+ if Trice.support_requested_at_stubbing.nil?
5
+ Trice.support_requested_at_stubbing = !Rails.env.production?
6
+ end
5
7
  end
6
8
  end
7
9
  end
data/lib/trice/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Trice
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - moro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport