This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"playlists"=> | |
[{"id"=>"2011", | |
"title"=>"test playlist", | |
"client_id"=>"1403", | |
"date_start"=>"0", | |
"date_end"=>"0", | |
"time_start"=>"0", | |
"time_end"=>"0", | |
"assets"=> | |
[{"id"=>"2003", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if current_playlist_published < new_playlist_published | |
new_playlist["playlists"][0]["assets"].each do |asset| | |
url_path = url + asset['path'] + 'files/' + asset["title"] | |
local_file = web_dir + asset["title"] | |
file_list = [] | |
file_list << asset["title"] | |
File.open(web_dir + 'playlist.json', 'w') {|f| f.write(new_playlist_raw) } | |
if FileTest.exists?(local_file) | |
pp "#{local_file} ---File Exists Not Downloading---" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new_playlist["playlists"][0]["assets"].each do |asset| | |
url_path = url + asset['path'] + 'files/' + asset["title"] | |
local_file = web_dir + asset["title"] | |
File.open(web_dir + 'playlist.json', 'w') {|f| f.write(new_playlist_raw) } | |
if FileTest.exists?(local_file) | |
pp "#{local_file} ---File Exists Not Downloading---" | |
else | |
open( web_dir + asset["title"], 'wb') do |file| | |
file << open(url_path).read | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.foreach(web_dir) do |f| | |
pp f | |
pp new_playlist["playlists"][0]["assets"].any? {|a| a[:title] == f } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ASSET HASH STRUCTURE | |
# {"id"=>"1855", | |
# "title"=>"BBQMay2010.swf", | |
# "client_id"=>"1403", | |
# "path"=>"/sites/default/files/assets/1403/", | |
# "type"=>"swf", | |
# "modified"=>"20121128", | |
# "date_start"=>"0", | |
# "date_end"=>"0", | |
# "time_start"=>"0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hash | |
{"playlists"=> | |
[{"id"=>"1848", | |
"title"=>"Playlist test", | |
"client_id"=>"1403", | |
"date_start"=>"0", | |
"date_end"=>"0", | |
"time_start"=>"0", | |
"time_end"=>"0", | |
"assets"=> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionView::Template::Error (undefined method `first_name' for #<User:0x00000008ff51d8>): | |
2012-12-07T15:42:07+00:00 app[web.1]: 49: <%= f.text_field :first_name, :class => "xlarge", :placeholder => "First Name" %> | |
2012-12-07T15:42:07+00:00 app[web.1]: 46: <%= form_for(resource, :as => resource_name,:url => registration_path(resource_name),:html => {:multipart => true}) do |f| %> | |
2012-12-07T15:42:07+00:00 app[web.1]: 47: <%= devise_error_messages! %> | |
2012-12-07T15:42:07+00:00 app[web.1]: app/views/users/registrations/new.html.erb:49:in `block in _app_views_users_registrations_new_html_erb__3542012466051859277_76777520' | |
2012-12-07T15:42:07+00:00 app[web.1]: 48: | |
2012-12-07T15:42:07+00:00 app[web.1]: app/views/users/registrations/new.html.erb:46:in `_app_views_users_registrations_new_html_erb__3542012466051859277_76777520' | |
2012-12-07T15:42:07+00:00 app[web.1]: | |
2012-12-07T15:42:07+00:00 app[web.1]: 50: <%= f.text_field :last_name, :class => "xlarge", :placeholder => "Last Name" % |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(resource, :as => resource_name,:url => registration_path(resource_name),:html => {:multipart => true}) do |f| %> | |
<%= devise_error_messages! %> | |
<%= f.text_field :first_name, :class => "xlarge", :placeholder => "First Name" %> | |
<%= f.text_field :last_name, :class => "xlarge", :placeholder => "Last Name" %> | |
</br> | |
<%= f.email_field :email, :class => "xlarge", :placeholder => "Email*" %> | |
<%= f.text_field :phone_number, :class => "xlarge", :placeholder => "Phone Number*" %> | |
</br> | |
<%= f.text_field :street_address, :class => "xlarge", :placeholder => "Street" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> | |
<%= devise_error_messages! %> | |
<%= f.text_field :first_name, :class => "xlarge", :placeholder => "First Name" %> | |
<%= f.text_field :last_name, :class => "xlarge", :placeholder => "Last Name" %> | |
</br> | |
<%= f.email_field :email, :class => "xlarge", :placeholder => "Email*" %> | |
<%= f.text_field :phone_number, :class => "xlarge", :placeholder => "Phone Number*" %> | |
</br> | |
<%= f.text_field :street_address, :class => "xlarge", :placeholder => "Street" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git add --all | |
git commit -am $1 | |
git push origin master | |
git push live master | |
cap deploy:update | |
cap deploy:migrate | |
cap deploy:cleanup -s keep_releases=1 | |
cap deploy:restart |