espresso 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -55,4 +55,4 @@ rescue LoadError
55
55
  end
56
56
 
57
57
  desc "Bump patch version and release to github and gemcutter"
58
- task :bump => %w(version:bump:patch release gemcutter:release)
58
+ task :bump => %w(version:bump:patch release gemcutter:release install)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/espresso.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{espresso}
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Semyonov"]
@@ -5,11 +5,7 @@ module Espresso
5
5
  module Model
6
6
  def self.included(model)
7
7
  model.extend ClassMethods
8
- model.class_eval do
9
- include InstanceMethods
10
-
11
- name_field(:name)
12
- end
8
+ model.send :include, InstanceMethods
13
9
  end
14
10
 
15
11
  module ClassMethods
@@ -41,11 +37,8 @@ module Espresso
41
37
  # «NameField» is a main field, used to represent model in to_s method and in simple queries
42
38
  # @param [Symbol, String] new_name_field new field name
43
39
  # @return [Symbol] field name
44
- def name_field(new_name_field = nil)
45
- if new_name_field.present?
46
- @@name_field = new_name_field.to_sym
47
- end
48
- @@name_field
40
+ def name_field
41
+ :name
49
42
  end
50
43
 
51
44
  # Make a slug from object’s NameField
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espresso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov