majoun 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # majoun
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/cookie.png)][gem]
3
+ [![Gem Version](https://badge.fury.io/rb/majoun.png)][gem]
4
4
  [![Build Status](https://secure.travis-ci.org/snusnu/cookie.png?branch=master)][travis]
5
5
  [![Dependency Status](https://gemnasium.com/snusnu/cookie.png)][gemnasium]
6
6
  [![Code Climate](https://codeclimate.com/github/snusnu/cookie.png)][codeclimate]
data/lib/cookie.rb CHANGED
@@ -6,6 +6,7 @@ require 'base64'
6
6
  require 'concord'
7
7
  require 'adamantium'
8
8
  require 'abstract_type'
9
+ require 'lupo'
9
10
 
10
11
  # Models an HTTP Cookie
11
12
  class Cookie
data/lib/cookie/header.rb CHANGED
@@ -6,21 +6,15 @@ class Cookie
6
6
  # into an HTTP 'Set-Cookie' header
7
7
  class Header
8
8
 
9
- include Equalizer.new(:cookie, :attributes)
9
+ include Concord.new(:cookie, :attributes)
10
10
  include Adamantium::Flat
11
11
 
12
- attr_reader :cookie
13
- protected :cookie
14
-
15
- attr_reader :attributes
16
- protected :attributes
17
-
18
12
  def self.build(name, value, attributes)
19
13
  new(Cookie.new(name, value), attributes)
20
14
  end
21
15
 
22
- def initialize(cookie, attributes = Attribute::Set::EMPTY)
23
- @cookie, @attributes = cookie, attributes
16
+ def self.new(cookie, attributes = Attribute::Set::EMPTY)
17
+ super
24
18
  end
25
19
 
26
20
  def with_domain(domain)
@@ -5,8 +5,7 @@ class Cookie
5
5
  # Models a registry of {Cookie} instances
6
6
  class Registry
7
7
 
8
- include Enumerable
9
- include Equalizer.new(:entries)
8
+ include Lupo.collection(:entries)
10
9
  include Adamantium::Flat
11
10
 
12
11
  # Message for {UnknownCookieError}
@@ -28,17 +27,8 @@ class Cookie
28
27
 
29
28
  private_class_method :cookie_hash
30
29
 
31
- attr_reader :entries
32
- protected :entries
33
-
34
- def initialize(entries = EMPTY_HASH)
35
- @entries = entries
36
- end
37
-
38
- def each(&block)
39
- return to_enum unless block
40
- entries.each(&block)
41
- self
30
+ def self.new(entries = EMPTY_HASH)
31
+ super
42
32
  end
43
33
 
44
34
  def fetch(name)
@@ -3,6 +3,6 @@
3
3
  class Cookie
4
4
 
5
5
  # Gem version
6
- VERSION = '0.0.1'.freeze
6
+ VERSION = '0.0.2'.freeze
7
7
 
8
8
  end
data/majoun.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency 'adamantium', '~> 0.2.0'
21
21
  gem.add_dependency 'abstract_type', '~> 0.0.7'
22
22
  gem.add_dependency 'concord', '~> 0.1.4'
23
+ gem.add_dependency 'lupo', '~> 0.0.1'
23
24
 
24
25
  gem.add_development_dependency 'bundler', '~> 1.6.1'
25
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: majoun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-06 00:00:00.000000000 Z
12
+ date: 2015-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: adamantium
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.1.4
62
+ - !ruby/object:Gem::Dependency
63
+ name: lupo
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.0.1
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.0.1
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: bundler
64
80
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
157
  version: '0'
142
158
  requirements: []
143
159
  rubyforge_project:
144
- rubygems_version: 1.8.23
160
+ rubygems_version: 1.8.23.2
145
161
  signing_key:
146
162
  specification_version: 3
147
163
  summary: Support for sending and receiving HTTP cookies on ruby servers