utopia 2.1.2 → 2.2.0

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: f3881efaedf6400b258104215042b8030b69ca3e
4
- data.tar.gz: e59045a36657c40b04bc30331fa0c15acc19b41b
3
+ metadata.gz: 0a8ab7d4e3b2ae63d567e00b81cb6a0eca2faebb
4
+ data.tar.gz: 354541a358b910c86713a002411af739eda77d68
5
5
  SHA512:
6
- metadata.gz: 20c2d659623389861d7636e79f81f5349c85a039e629c7926e12afa59cd2fe339dd8ae8f279ca81b792c6c39a8a6a6ed263c336f8ac20e8841abd2328ae3de03
7
- data.tar.gz: 9e7daab38c5752fe5d896dc0466b399a90947f30692b66f7505bb6051537d298ab435d17cefdbb2ee7476a250a6889ecc11ed971d4038a220564a4e1ac61c61b
6
+ metadata.gz: 1e580af2a4540e8456cb892f3fadeda156213720a2cfe7f3779f62eaf09d0152cbe5ce8ef9132cffc0a79b4e726321b3685ca63e44acfdab1eaa3e42c0b5b753
7
+ data.tar.gz: 88ec745909cbc0b8e2a96a4f18cf6a3d63f20fb80f356a6ecbe644dee614ec0cae5045cd949a07f8d243dfacb419d973c7cec02db7468731d1fb50fb5e2c2e0d
data/.travis.yml CHANGED
@@ -8,6 +8,7 @@ before_install:
8
8
  - git config --global user.name "Samuel Williams"
9
9
  # https://github.com/rubygems/rubygems/issues/1448
10
10
  - gem update --system
11
+ - gem install bundler
11
12
  rvm:
12
13
  - 2.2
13
14
  - 2.3
data/Gemfile CHANGED
@@ -19,7 +19,7 @@ group :test do
19
19
  gem 'benchmark-ips'
20
20
  gem 'ruby-prof', platforms: :mri
21
21
 
22
- gem 'guard-puma'
22
+ gem 'guard-falcon'
23
23
 
24
24
  gem 'rack-test'
25
25
  gem 'rack-freeze', '~> 1.2'
@@ -41,10 +41,13 @@ module Utopia
41
41
  @name, @locale = path.last.split('.', 2)
42
42
  @path = path
43
43
  when :directory
44
- # raise ArgumentError unless path.last.start_with? INDEX
44
+ @name = path.basename
45
45
 
46
- @name = path.dirname.last
47
- @locale = path.last.split('.', 2)[1]
46
+ if @name == INDEX
47
+ @name = path.dirname.basename
48
+ end
49
+
50
+ @locale = path.extension
48
51
  @path = path
49
52
  when :virtual
50
53
  @name, @locale = path.to_s.split('.', 2)
@@ -187,7 +187,7 @@ module Utopia
187
187
 
188
188
  if indices_count == 0
189
189
  # Specify a nil uri if no index could be found for the directory:
190
- yield Link.new(:directory, top + [name, ""], {:uri => nil}.merge(directory_metadata))
190
+ yield Link.new(:directory, top + [name], {:uri => nil}.merge(directory_metadata))
191
191
  end
192
192
  end
193
193
 
@@ -67,7 +67,7 @@ module Utopia
67
67
  end
68
68
 
69
69
  def parent_path
70
- uri_path.dirname
70
+ @uri_path.dirname
71
71
  end
72
72
 
73
73
  def links(path = '.', **options, &block)
@@ -82,15 +82,13 @@ module Utopia
82
82
  end
83
83
 
84
84
  def related_links
85
- name = @uri_path.last.split('.', 2).first
85
+ name = @uri_path.basename
86
86
 
87
- return Links.index(@controller.root, uri_path.dirname, :name => name, :indices => true)
87
+ return Links.index(@controller.root, @uri_path.dirname, :name => @uri_path.basename, :indices => true)
88
88
  end
89
89
 
90
90
  def siblings_path
91
- name = @uri_path.last.split('.', 2).first
92
-
93
- if name == INDEX
91
+ if @uri_path.basename == INDEX
94
92
  @uri_path.dirname(2)
95
93
  else
96
94
  @uri_path.dirname
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "2.1.2"
22
+ VERSION = "2.2.0"
23
23
  end
data/utopia.gemspec CHANGED
@@ -39,6 +39,6 @@ Gem::Specification.new do |spec|
39
39
 
40
40
  spec.add_development_dependency 'bundler', '~> 1.3'
41
41
  spec.add_development_dependency 'rspec', '~> 3.6'
42
- spec.add_development_dependency 'puma'
42
+ spec.add_development_dependency 'falcon'
43
43
  spec.add_development_dependency 'rake'
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-02 00:00:00.000000000 Z
11
+ date: 2017-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni
@@ -151,7 +151,7 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '3.6'
153
153
  - !ruby/object:Gem::Dependency
154
- name: puma
154
+ name: falcon
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
@@ -549,7 +549,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
549
549
  version: '0'
550
550
  requirements: []
551
551
  rubyforge_project:
552
- rubygems_version: 2.6.12
552
+ rubygems_version: 2.6.10
553
553
  signing_key:
554
554
  specification_version: 4
555
555
  summary: Utopia is a framework for building dynamic content-driven websites.