lolita 3.4.1 → 3.4.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: 7f81d378fd85598e5de4c672cb470af30b6cb90f
4
- data.tar.gz: 33b6055aaa7dbee4965baddd4c6a46e2c72fb192
3
+ metadata.gz: c8f6b4828bc664dd5ccfb85ea2e86a0a7c06a0c7
4
+ data.tar.gz: effe4caad3092762a9ed1f6ecbefc8e6620425c0
5
5
  SHA512:
6
- metadata.gz: 769ab380f0638ea6f64cf9a39bc1e11bcd1be74dc1762952cc6135e8fd1c1111aef963c17f033d3a475dd4a60bdebfb9d9442ab0ec7b8318d2379f7084e306c5
7
- data.tar.gz: a7c55aa4efa03cc50f5c77bada37f27ac01dd6a21e4852f1aaf843e6a0b105dbdb6397f59a9bcebe2a3b6f72644f2cae93278bd120e073398dc26d1e2db771ed
6
+ metadata.gz: 6f44d2af71a34f341113439e8bf93e15c13d30728edbf9656e0adbee25ffd4317ff397d0f74e54d42563dd247864689f7ba9d77ca6a6127d37f8b7fb8c591f86
7
+ data.tar.gz: d0767db7fd8ee50c6b8b8f7070f493fc9c25db2473479f6b3236ad24f95471ea7c19413b94bcbf72a9f664fa908fcbad066ddc171c94286712997d6fc7bcc242
data/README.md CHANGED
@@ -136,6 +136,12 @@ Lolita::Hooks.component(:"/lolita/configuration/list/display").around do
136
136
  end
137
137
  ```
138
138
 
139
+ ##Tests
140
+ To run all specs run rake, it will run all specs for all supported ORM's.
141
+
142
+ $ rake
143
+
144
+
139
145
  ##License
140
146
 
141
147
  Lolita is under MIT license. See [LICENSE.txt](https://github.com/ithouse/lolita/blob/master/LICENSE.txt)
@@ -1,10 +1,8 @@
1
1
  module Lolita
2
2
  module Controllers
3
-
4
3
  module InternalHelpers
5
-
6
4
  def include_application_assets
7
- result = ""
5
+ result = ''
8
6
  Lolita.application.assets.each do |asset_name|
9
7
  if asset_name.match(/\.js(\.|$)/)
10
8
  result << javascript_include_tag(asset_name)
@@ -18,17 +16,17 @@ module Lolita
18
16
  def resource
19
17
  instance_variable_get(:"@#{resource_name}")
20
18
  end
21
-
19
+
22
20
  def resource_name
23
- lolita_mapping.class_name.underscore.to_sym
21
+ lolita_mapping.class_name.gsub(/::/, '_').underscore.to_sym
24
22
  end
25
-
23
+
26
24
  def resource_class
27
25
  lolita_mapping.to
28
26
  end
29
-
27
+
30
28
  def lolita_mapping(new_mapping = nil)
31
- @lolita_mapping ||= request.env["lolita.mapping"]
29
+ @lolita_mapping ||= request.env['lolita.mapping']
32
30
  end
33
31
 
34
32
  def current_form=(form)
@@ -46,7 +44,7 @@ module Lolita
46
44
  end
47
45
 
48
46
  def use_mapping(new_mapping)
49
- if block_given?
47
+ if block_given?
50
48
  begin
51
49
  @old_mapping = lolita_mapping
52
50
  @lolita_mapping = new_mapping
@@ -59,18 +57,15 @@ module Lolita
59
57
  end
60
58
 
61
59
  def is_lolita_resource?
62
- raise ActionController::UnknownAction unless lolita_mapping
60
+ fail ActionController::UnknownAction unless lolita_mapping
63
61
  true
64
62
  end
65
63
 
66
64
  protected
67
65
 
68
-
69
66
  def resource=(new_resource)
70
- instance_variable_set(:"@#{resource_name}",new_resource)
67
+ instance_variable_set(:"@#{resource_name}", new_resource)
71
68
  end
72
-
73
69
  end
74
-
75
70
  end
76
71
  end
@@ -2,7 +2,7 @@ module Lolita
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 1
5
+ PATCH = 2
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITHouse (Latvia) and Arturs Meisters
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-16 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari