artifact 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/artifact/helpers.rb +0 -4
- data/lib/artifact/middleman.rb +0 -5
- data/lib/artifact/version.rb +1 -1
- data/lib/artifact/views/uploads/_list.erb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ed2d59735852d7b822ffc6011f150e7a77108b9
|
4
|
+
data.tar.gz: 8229aba4be49909f8ef96f6c828a98e5ddc57176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 316aa5e130483fd92fe8446348f328e1da0de0551d637294848b2f5b4ee7107a04c1e3176ebeb4f5b4086b69afd5de8127b9caf1dd44f09f1c615959f8b9dd1d
|
7
|
+
data.tar.gz: 4347bc951d6826a04da3f53494d7f01e8f00362d26589764527a5c1e59dfb405b3991199cb4d5d5ff597dc6ce064281853fa277d2102a0a0605e0d5118f1a870
|
data/lib/artifact/helpers.rb
CHANGED
@@ -63,10 +63,6 @@ module Artifact
|
|
63
63
|
request.path[link] ? 'active' : ''
|
64
64
|
end
|
65
65
|
|
66
|
-
def view_upload_path(file)
|
67
|
-
url(upload_relative_path(file))
|
68
|
-
end
|
69
|
-
|
70
66
|
def upload_relative_path(file)
|
71
67
|
# we need to start with a /, otherwise middleman will insert his image_path as prefix
|
72
68
|
'/' + Artifact.config.uploads_path + file.path.sub(Artifact.uploads.path, '')
|
data/lib/artifact/middleman.rb
CHANGED
@@ -151,11 +151,6 @@ module Artifact
|
|
151
151
|
redirect to('/posts')
|
152
152
|
end
|
153
153
|
|
154
|
-
get '/uploads/*' do
|
155
|
-
file = params[:splat].first
|
156
|
-
send_file File.join(Artifact.uploads.path, file)
|
157
|
-
end
|
158
|
-
|
159
154
|
get '/uploads' do
|
160
155
|
get_uploads
|
161
156
|
# @uploads.select! {|i| i.match(/\.(png|jpg|jpeg|gif)/i) }
|
data/lib/artifact/version.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
<ul class="container">
|
2
2
|
<% @uploads.each do |file| %>
|
3
3
|
<li>
|
4
|
-
<a href="<%=
|
4
|
+
<a href="<%= upload_relative_path(file) %>">
|
5
5
|
<% if is_image?(file.path) %>
|
6
6
|
<a class="insert-image"
|
7
7
|
href="#"
|
8
8
|
data-name="<%= file.slug %>"
|
9
9
|
data-url="<%= upload_relative_path(file) %>">Insert</a>
|
10
|
-
<img src="<%=
|
10
|
+
<img src="<%= upload_relative_path(file) %>" />
|
11
11
|
<% else %>
|
12
12
|
<%= file.filename %>
|
13
13
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artifact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -171,8 +171,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.2.0
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: Frontend UI for git blogging.
|
178
178
|
test_files: []
|
179
|
+
has_rdoc:
|