artifact 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,4 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency "activesupport"
27
27
  spec.add_dependency "rugged"
28
28
  spec.add_dependency "sinatra"
29
+ spec.add_dependency "sinatra-contrib"
30
+ spec.add_dependency "rack-flash3"
29
31
  end
@@ -1,9 +1,17 @@
1
- var last_content;
1
+ var timer,
2
+ last_content;
2
3
 
3
4
  function auto_save(cb) {
4
5
 
5
- var form = $('#post-form'),
6
- current = form[0].content.value;
6
+ var form = $('#post-form');
7
+
8
+ // only auto save existing posts, otherwise there's nowhere to write!
9
+ if (!form[0] || form.hasClass('new-post')) {
10
+ if (timer) clearTimeout(timer);
11
+ return cb && cb();
12
+ }
13
+
14
+ var current = form[0].content.value;
7
15
 
8
16
  if (last_content && current != last_content) {
9
17
  $.ajax({
@@ -11,7 +19,7 @@ function auto_save(cb) {
11
19
  url: form.attr('action'),
12
20
  data: form.serialize(),
13
21
  success: function() {
14
- console.log('Saved.');
22
+ console.log('Auto-saved.');
15
23
  cb && cb();
16
24
  }
17
25
  });
@@ -34,10 +42,7 @@ $(function() {
34
42
  });
35
43
  });
36
44
 
37
- // only auto save existing posts, otherwise there's nowhere to write!
38
- if ($('#post-form')[0] && !$('#post-form').hasClass('.new-post')) {
39
- var timer = setInterval(auto_save, 10000);
40
- }
45
+ timer = setInterval(auto_save, 30000);
41
46
 
42
47
  $(document).on('click', '.insert-image', function(el) {
43
48
  var url = $(this).data('url');
@@ -1,3 +1,3 @@
1
1
  module Artifact
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,122 +1,143 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: artifact
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 4
9
+ version: 0.0.4
5
10
  platform: ruby
6
- authors:
7
- - Tomás Pollak
11
+ authors:
12
+ - "Tom\xC3\xA1s Pollak"
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2015-06-05 00:00:00 -07:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
14
21
  name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.3'
20
- type: :development
21
22
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.3'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 3
30
+ version: "1.3"
34
31
  type: :development
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
35
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ requirements:
38
38
  - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.6'
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
42
+ version: "0"
48
43
  type: :development
44
+ version_requirements: *id002
45
+ - !ruby/object:Gem::Dependency
46
+ name: rspec
49
47
  prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.6'
55
- - !ruby/object:Gem::Dependency
48
+ requirement: &id003 !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ~>
51
+ - !ruby/object:Gem::Version
52
+ segments:
53
+ - 2
54
+ - 6
55
+ version: "2.6"
56
+ type: :development
57
+ version_requirements: *id003
58
+ - !ruby/object:Gem::Dependency
56
59
  name: rack
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
60
  prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
61
+ requirement: &id004 !ruby/object:Gem::Requirement
62
+ requirements:
66
63
  - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: activesupport
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
64
+ - !ruby/object:Gem::Version
65
+ segments:
66
+ - 0
67
+ version: "0"
76
68
  type: :runtime
69
+ version_requirements: *id004
70
+ - !ruby/object:Gem::Dependency
71
+ name: activesupport
77
72
  prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
73
+ requirement: &id005 !ruby/object:Gem::Requirement
74
+ requirements:
80
75
  - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
76
+ - !ruby/object:Gem::Version
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ type: :runtime
81
+ version_requirements: *id005
82
+ - !ruby/object:Gem::Dependency
84
83
  name: rugged
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
84
+ prerelease: false
85
+ requirement: &id006 !ruby/object:Gem::Requirement
86
+ requirements:
87
87
  - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
88
+ - !ruby/object:Gem::Version
89
+ segments:
90
+ - 0
91
+ version: "0"
90
92
  type: :runtime
93
+ version_requirements: *id006
94
+ - !ruby/object:Gem::Dependency
95
+ name: sinatra
91
96
  prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
97
+ requirement: &id007 !ruby/object:Gem::Requirement
98
+ requirements:
94
99
  - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: sinatra
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 0
103
+ version: "0"
104
+ type: :runtime
105
+ version_requirements: *id007
106
+ - !ruby/object:Gem::Dependency
107
+ name: sinatra-contrib
108
+ prerelease: false
109
+ requirement: &id008 !ruby/object:Gem::Requirement
110
+ requirements:
101
111
  - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
112
+ - !ruby/object:Gem::Version
113
+ segments:
114
+ - 0
115
+ version: "0"
104
116
  type: :runtime
117
+ version_requirements: *id008
118
+ - !ruby/object:Gem::Dependency
119
+ name: rack-flash3
105
120
  prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
121
+ requirement: &id009 !ruby/object:Gem::Requirement
122
+ requirements:
108
123
  - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
124
+ - !ruby/object:Gem::Version
125
+ segments:
126
+ - 0
127
+ version: "0"
128
+ type: :runtime
129
+ version_requirements: *id009
111
130
  description: Frontend UI for git blogging.
112
- email:
131
+ email:
113
132
  - tomas@forkhq.com
114
- executables:
133
+ executables:
115
134
  - artifact
116
135
  extensions: []
136
+
117
137
  extra_rdoc_files: []
118
- files:
119
- - ".gitignore"
138
+
139
+ files:
140
+ - .gitignore
120
141
  - Gemfile
121
142
  - LICENSE.txt
122
143
  - README.md
@@ -151,29 +172,35 @@ files:
151
172
  - lib/artifact/views/shared/_menu.erb
152
173
  - lib/artifact/views/uploads/_form.erb
153
174
  - lib/artifact/views/uploads/_list.erb
154
- homepage: ''
155
- licenses:
175
+ has_rdoc: true
176
+ homepage: ""
177
+ licenses:
156
178
  - MIT
157
- metadata: {}
158
179
  post_install_message:
159
180
  rdoc_options: []
160
- require_paths:
181
+
182
+ require_paths:
161
183
  - lib
162
- required_ruby_version: !ruby/object:Gem::Requirement
163
- requirements:
184
+ required_ruby_version: !ruby/object:Gem::Requirement
185
+ requirements:
164
186
  - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- required_rubygems_version: !ruby/object:Gem::Requirement
168
- requirements:
187
+ - !ruby/object:Gem::Version
188
+ segments:
189
+ - 0
190
+ version: "0"
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
169
193
  - - ">="
170
- - !ruby/object:Gem::Version
171
- version: '0'
194
+ - !ruby/object:Gem::Version
195
+ segments:
196
+ - 0
197
+ version: "0"
172
198
  requirements: []
199
+
173
200
  rubyforge_project:
174
- rubygems_version: 2.2.0
201
+ rubygems_version: 1.3.6
175
202
  signing_key:
176
- specification_version: 4
203
+ specification_version: 3
177
204
  summary: Frontend UI for git blogging.
178
205
  test_files: []
179
- has_rdoc:
206
+
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 0bda99fa0e5fde0177d4744d68fd15f6468a7c30
4
- data.tar.gz: cdf2bb96ae7f24420fa80374d8a72f5b78cb5551
5
- SHA512:
6
- metadata.gz: 60e0a5ac8cc6037aa5b4bfa421551d616b14430fbe67f964255d461a1532673db83e13f26433d9cdd3ad2bfe2e3e8ef2d1ee97971030e1a93f762906f7da998c
7
- data.tar.gz: 85355c680662dec4cdd41b5e34d7526fb2e7564e0efbbfea95f29c7cce45042c0cb3b7cb9c4b030144132085737c9cb0b7e2a3bb5dc3466f6a84fe04ab6ba72f