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
| Program.all.each do |p| | |
| p.update_attribute(:hours, "до 8 часов") if p.hours.blank? | |
| p.update_attribute(:peoples, "до 300 человек") if p.peoples.blank? | |
| 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
| $ cat /var/log/upstart/drone.log | |
| 2014/04/06 15:04:10 Database already up-to-date. | |
| 2014/04/06 15:04:10 starting drone version 2a009fa on port :8081 | |
| 2014/04/06 20:03:56 Database already up-to-date. | |
| 2014/04/06 20:03:56 starting drone version 2a009fa on port :8081 | |
| 2014/04/06 20:05:20 Database already up-to-date. | |
| 2014/04/06 20:05:20 starting drone version 2a009fa on port :8081 | |
| 2014/04/06 20:11:11 error updating github status: Not Found | |
| starting service container bradrydzewski/postgres:9.1 | |
| creating build image |
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
| module Slugeable | |
| extend ActiveSupport::Concern | |
| included do | |
| extend FriendlyId | |
| friendly_id :slug_candidates, use: :slugged | |
| def slug_candidates | |
| if defined?(self.posted_at) | |
| "#{posted_at}-#{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
| require 'nokogiri' | |
| require 'excon' | |
| require 'active_support/time' | |
| require 'pp' | |
| sch = [] | |
| (2..17).each do |day| | |
| day_of_month = day + 6 | |
| response = Excon.get("http://www.sochi2014.com/ezhednevnoe-raspisanie-den-#{day}") | |
| page = Nokogiri::HTML(response.body) |
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
| bugagazavr@Kirills-Mac-Pro ~/Documents/Ruby/teobit_fog (master●●)$ bundle exec rake assets:precompile | |
| MiniTest::Unit::TestCase is now Minitest::Test. From /Users/bugagazavr/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>' | |
| [fog][WARNING] PATCHING Fog::Storage::OpenStack to added debugging information to JSON decoding | |
| cp public/assets/chosen-sprite-d097caf71641f3afb04998af85b36b33.png public/assets/chosen-sprite.png | |
| cp public/assets/chosen-sprite-fa9df9bbee9f1ab89799379cb153636e.png public/assets/chosen-sprite.png | |
| cp public/assets/[email protected] public/assets/[email protected] | |
| cp public/assets/[email protected] public/assets/[email protected] | |
| [fog][WARNING] Unrecognized arguments: region | |
| [/awesome] empty? true parse_json: true type: | |
| [/awesome] content-type: '' |
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
| bugagazavr@Kirills-Mac-Pro ~/Documents/Ruby/teobit_fog (master●●)$ bundle exec rake assets:precompile | |
| MiniTest::Unit::TestCase is now Minitest::Test. From /Users/bugagazavr/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>' | |
| [fog][WARNING] PATCHING Fog::Storage::OpenStack to added debugging information to JSON decoding | |
| cp public/assets/chosen-sprite-d097caf71641f3afb04998af85b36b33.png public/assets/chosen-sprite.png | |
| cp public/assets/chosen-sprite-fa9df9bbee9f1ab89799379cb153636e.png public/assets/chosen-sprite.png | |
| cp public/assets/[email protected] public/assets/[email protected] | |
| cp public/assets/[email protected] public/assets/[email protected] | |
| [fog][WARNING] Unrecognized arguments: region | |
| [/awesome] empty? true parse_json: true type: | |
| rake aborted! |
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
| bugagazavr@kirill-pc ~/Ruby/teobit (master●●●●)$ rails c [ruby-2.1.0] | |
| MiniTest::Unit::TestCase is now Minitest::Test. From /home/bugagazavr/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>' | |
| Loading development environment (Rails 4.1.0.beta1) | |
| 2.1.0 :001 > h = {:body=>"[{\"hash\": \"ce57f8c0298ccef30834b4211c2cce05\", \"last_modified\": \"2014-01-15T19:06:25.171580\", \"bytes\": 326251, \"name\": \"assets/portfolio/yakimanka/big-b98fe3cc2755fd1e4a555df5daf29501.png\", \"content_type\": \"image/png\"}, {\"hash\": \"ceda121d33a60bd23c13d76684eb0703\", \"last_modified\": \"2014-01-15T19:06:25.405910\", \"bytes\": 21918, \"name\": \"assets/portfolio/yakimanka/graphics/attendance-cad26723da5b872a5dfd6c0787f0ee65.png\", \"content_type\": \"image/png\"}, {\"hash\": \"02e4b3bf43a5a07267ca23e4304f4b9f\", \"last_modified\": \"2014-01-15T19:06:25.697320\", \"bytes\": 11058, \"name\": \"assets/portf |
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
| source 'http://rubygems.org' | |
| source 'https://rails-assets.org' | |
| gem 'rails', '4.1.0.beta1' | |
| gem 'pg', '~> 0.17.1' | |
| gem 'devise', '~> 3.2.2' | |
| gem 'yaml_db', github: 'Teobit/yaml_db' | |
| gem 'nokogiri', '1.6.0' | |
| gem 'carrierwave', '~> 0.9.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
| excon.request {:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.19.0", "X-Auth-Key"=>"SOMEKEY", "X-Auth-User"=>"SOMEUSER", "Host"=>"auth.selcdn.ru:443"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"auth.selcdn.ru", :path=>"/v1.0", :port=>443, :query=>nil, :scheme=>"https", :user=>nil, :password=>"REDACTED", :instrumentor=>Excon::StandardInstrumentor, :expects=>[200, 204], :method=>"GET", :retries_remaining=>4, :connection=>#<Excon::Connection:7f976f534450 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:! |
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
| CarrierWave.configure do |config| | |
| if Rails.env.development? || Rails.env.test? | |
| config.storage = :file | |
| else | |
| config.storage = :fog | |
| config.fog_credentials = { | |
| :provider => 'OpenStack', | |
| :openstack_auth_url => 'https://auth.selcdn.ru/v1.0', | |
| :openstack_username => Rails.application.secrets.openstack_username, | |
| :openstack_api_key => Rails.application.secrets.openstack_api_key |