Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
lines-engine (1.2.6.1)
lines-engine (1.2.7.0)
acts-as-taggable-on (>= 3.5)
bcrypt (~> 3.1.0, >= 3.1.0)
carrierwave (>= 0.10.0)
Expand All @@ -15,9 +15,9 @@ PATH
meta-tags (>= 2.0.0)
orm_adapter (>= 0.5)
pygments.rb (>= 0.6.0)
rails (>= 3, < 6)
rails (>= 3, < 7)
rails3-jquery-autocomplete (>= 1.0.11)
railties (>= 3.2.6, < 6)
railties (>= 3.2.6, < 7)
redcarpet (>= 3.3.3)
rmagick (>= 2.13.4)
sanitize (>= 4.4.0)
Expand All @@ -31,50 +31,50 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.4)
actionpack (= 5.2.4.4)
actioncable (5.2.6)
actionpack (= 5.2.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.4)
actionpack (= 5.2.4.4)
actionview (= 5.2.4.4)
activejob (= 5.2.4.4)
actionmailer (5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.4)
actionview (= 5.2.4.4)
activesupport (= 5.2.4.4)
actionpack (5.2.6)
actionview (= 5.2.6)
activesupport (= 5.2.6)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.4)
activesupport (= 5.2.4.4)
actionview (5.2.6)
activesupport (= 5.2.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.4)
activesupport (= 5.2.4.4)
activejob (5.2.6)
activesupport (= 5.2.6)
globalid (>= 0.3.6)
activemodel (5.2.4.4)
activesupport (= 5.2.4.4)
activerecord (5.2.4.4)
activemodel (= 5.2.4.4)
activesupport (= 5.2.4.4)
activemodel (5.2.6)
activesupport (= 5.2.6)
activerecord (5.2.6)
activemodel (= 5.2.6)
activesupport (= 5.2.6)
arel (>= 9.0)
activestorage (5.2.4.4)
actionpack (= 5.2.4.4)
activerecord (= 5.2.4.4)
marcel (~> 0.3.1)
activesupport (5.2.4.4)
activestorage (5.2.6)
actionpack (= 5.2.6)
activerecord (= 5.2.6)
marcel (~> 1.0.0)
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
acts-as-taggable-on (7.0.0)
acts-as-taggable-on (8.1.0)
activerecord (>= 5.0, < 6.2)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
Expand All @@ -96,13 +96,14 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
carrierwave (2.1.0)
carrierwave (2.2.2)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
image_processing (~> 1.1)
mimemagic (>= 0.3.0)
marcel (~> 1.0.0)
mini_mime (>= 0.1.3)
ssrf_filter (~> 1.0)
coderay (1.1.3)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
Expand All @@ -111,7 +112,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
crass (1.0.6)
diff-lcs (1.4.4)
erubi (1.10.0)
Expand All @@ -127,8 +128,8 @@ GEM
formatador (0.2.5)
friendly_id (5.4.2)
activerecord (>= 4.0.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalid (0.5.2)
activesupport (>= 5.0)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
Expand All @@ -141,7 +142,7 @@ GEM
guard-rspec (4.2.0)
guard (>= 2.1.1)
rspec (>= 2.14, < 4.0)
i18n (1.8.8)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
image_processing (1.12.1)
mini_magick (>= 4.9.5, < 5)
Expand Down Expand Up @@ -173,32 +174,30 @@ GEM
listen (3.4.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.9.0)
loofah (2.9.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
meta-tags (2.14.0)
marcel (1.0.1)
meta-tags (2.15.0)
actionpack (>= 3.2.0, < 6.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.11.0)
mini_mime (1.0.2)
mini_portile2 (2.5.0)
minitest (5.14.3)
mini_mime (1.0.3)
mini_portile2 (2.5.3)
minitest (5.14.4)
mysql2 (0.5.3)
nenv (0.3.0)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
nio4r (2.5.4)
nokogiri (1.11.1)
nio4r (2.5.8)
nokogiri (1.11.7)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogumbo (2.0.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
notiffany (0.1.3)
nenv (~> 0.1)
Expand All @@ -208,24 +207,24 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
pygments.rb (2.0.0)
pygments.rb (2.2.0)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
railroady (1.5.3)
rails (5.2.4.4)
actioncable (= 5.2.4.4)
actionmailer (= 5.2.4.4)
actionpack (= 5.2.4.4)
actionview (= 5.2.4.4)
activejob (= 5.2.4.4)
activemodel (= 5.2.4.4)
activerecord (= 5.2.4.4)
activestorage (= 5.2.4.4)
activesupport (= 5.2.4.4)
rails (5.2.6)
actioncable (= 5.2.6)
actionmailer (= 5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
activemodel (= 5.2.6)
activerecord (= 5.2.6)
activestorage (= 5.2.6)
activesupport (= 5.2.6)
bundler (>= 1.3.0)
railties (= 5.2.4.4)
railties (= 5.2.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
Expand All @@ -234,19 +233,19 @@ GEM
loofah (~> 2.3)
rails3-jquery-autocomplete (1.0.15)
rails (>= 3.2)
railties (5.2.4.4)
actionpack (= 5.2.4.4)
activesupport (= 5.2.4.4)
railties (5.2.6)
actionpack (= 5.2.6)
activesupport (= 5.2.6)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.3)
rake (13.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
regexp_parser (2.0.3)
rmagick (4.1.2)
rmagick (4.2.2)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
Expand All @@ -263,8 +262,8 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
ruby-vips (2.0.17)
ffi (~> 1.9)
ruby-vips (2.1.2)
ffi (~> 1.12)
sanitize (5.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
Expand Down Expand Up @@ -294,14 +293,15 @@ GEM
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
ssrf_filter (1.0.7)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
Expand Down
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ To update an existing user, you’ll need the rails console with 'rails c'


=== UPDATE an existing user
u = User.find_by_email('[email protected]')
u = Lines::User.find_by(email: '[email protected]')
u.email = "[email protected]"
u.password = "newsekret"
u.save
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/lines/application.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'pygments.css';
@import 'pygments';
@import 'fonts';
@import 'variables_and_mixins';
@import 'navbar';
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/lines/admin/articles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def update
end

respond_to do |format|
if @article.update_attributes(article_params)
if @article.update(article_params)
ActionController::Base.new.expire_fragment(@article)
format.html { redirect_to admin_article_path(@article) }
else
Expand All @@ -102,7 +102,7 @@ def destroy
# Toggles published state of an article
def toggle_publish
@article = Article.friendly.find(params[:article_id])
@article.update_attributes(published: [email protected])
@article.update(published: [email protected])
flash[:success] = "“#{@article.title}” has been #{'un' if [email protected]}published."
redirect_to admin_articles_url
end
Expand All @@ -113,10 +113,10 @@ def toggle_feature
old_featured = Article.where(featured: true)
if old_featured.size > 0
old_featured.each do |article|
article.update_attributes(featured: false)
article.update(featured: false)
end
end
@article.update_attributes(featured: [email protected])
@article.update(featured: [email protected])
redirect_to admin_articles_url
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/lines/admin/authors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create
def update
@author = Lines::Author.find(params[:id])

if @author.update_attributes(author_params)
if @author.update(author_params)
redirect_to admin_author_path(@author)
else
render action: "edit"
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/lines/admin/pictures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def update
@picture = Lines::Picture.find(params[:id])

respond_to do |format|
if @picture.update_attributes(picture_params[:picture])
if @picture.update(picture_params[:picture])
format.html { redirect_to @picture }
else
format.html { render action: "edit" }
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/lines/password_resets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def update
elsif wrong_password_confirmation?
flash.now[:error] = "Password confirmation does not match."
render 'edit'
elsif @user.update_attributes(user_params)
elsif @user.update(user_params)
# deletr reset_digest and reset_sent_at
@user.update_attributes(reset_digest: nil, reset_sent_at: nil)
@user.update(reset_digest: nil, reset_sent_at: nil)
flash[:success] = "Password has been reset. You can now log in with the new password."
redirect_to new_session_path
else
Expand Down
4 changes: 2 additions & 2 deletions app/models/lines/article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def update_used_images
image_ids = self.used_images
if !image_ids.nil?
Picture.where(id: image_ids).each do |picture|
picture.update_attributes(article_id: self.id)
picture.update(article_id: self.id)
end
end
end
Expand Down Expand Up @@ -124,4 +124,4 @@ def absolute_url_for(image)
end

end
end
end
2 changes: 1 addition & 1 deletion lib/lines/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Lines
VERSION = "1.2.6.1"
VERSION = "1.2.7.0"
end
4 changes: 2 additions & 2 deletions lines.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'orm_adapter', '>= 0.5'
s.add_runtime_dependency 'thread_safe', '>= 0.3'
s.add_runtime_dependency 'railties', '>= 3.2.6', '< 6'
s.add_runtime_dependency 'railties', '>= 3.2.6', '< 7'
s.add_runtime_dependency 'rmagick', '>= 2.13.4'
s.add_runtime_dependency 'thor', '>= 0.19'
s.add_runtime_dependency 'carrierwave', '>= 0.10.0'
Expand All @@ -42,7 +42,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'meta-tags', '>= 2.0.0'
s.add_runtime_dependency 'i18n', '>= 0.7.0'
s.add_runtime_dependency 'sprockets-rails', '< 4'
s.add_runtime_dependency 'rails', ['>= 3', '< 6']
s.add_runtime_dependency 'rails', ['>= 3', '< 7']

s.add_development_dependency 'mysql2'
s.add_development_dependency 'rspec-rails', '~> 2.14.2', '< 3'
Expand Down