This file contains 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
public class Koło { | |
private double promień; | |
public Koło(int a){ | |
promień = a; | |
} | |
public double obliczObwódKoła(){ | |
return 2*Math.PI*promień; | |
} |
This file contains 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
departures: [ | |
{ | |
availability: 2 | |
discounted: false | |
start_date: 06-04-2013 | |
pricing: [ | |
{ | |
age_group: "Adult", | |
prices: [ | |
{name: "USD", value: 1000}, |
This file contains 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
departures: [ | |
{ | |
availability: 2 | |
discounted: false | |
discount: nil | |
start_date: 06-04-2013 | |
pricing: [ | |
Some prices | |
] | |
}, |
This file contains 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
departures = [ | |
{ | |
availability: 12, | |
start_date: "2013-05-11", | |
pricing: [ | |
{ | |
age_group: "Child", | |
prices: [ | |
{:name=>"USD", :value=>1199.0}, | |
{:name=>"AUD", :value=>1199.0}, |
This file contains 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
departures = [ | |
{ | |
availability: 12, | |
start_date: "2013-05-11", | |
pricing: [ | |
{ | |
age_group: "Child", | |
prices: [ | |
{:name=>"USD", :value=>1199.0}, | |
{:name=>"AUD", :value=>1199.0}, |
This file contains 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
irb(main):002:0> summary = "<p>Some summary review.</p>\n\r" | |
=> "<p>Some summary review.</p>\n\r" | |
irb(main):003:0> detail = "<p>Some detailed review</p>\n" | |
=> "<p>Some detailed review</p>\n" | |
irb(main):004:0> CrazyHarry.fragment(summary).redact!(unsafe: true, tags: 'p').to_s | |
=> "Some summary review." | |
irb(main):005:0> CrazyHarry.fragment(summary + detail).redact!(unsafe: true, tags: 'p').to_s | |
=> "Some summary review.\n\n\rSome detailed review" |
This file contains 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
All examples were filtered out; ignoring {:focus=>true} | |
1) RowlfTours::FileSystemFetcher#fetch saves data if cached file not exist | |
Failure/Error: subject.fetch(url) | |
NoMethodError: | |
undefined method `url' for {:uris=>[#<Addressable::URI:0x197f0a8 URI:http://api.com/1>]}:Hash | |
# ./lib/rowlf_tours/shared/fetchers/file_system_fetcher.rb:42:in `block in missing_files' | |
# ./lib/rowlf_tours/shared/fetchers/requests.rb:10:in `each' | |
# ./lib/rowlf_tours/shared/fetchers/requests.rb:10:in `each' | |
# ./lib/rowlf_tours/shared/fetchers/file_system_fetcher.rb:41:in `reject' | |
# ./lib/rowlf_tours/shared/fetchers/file_system_fetcher.rb:41:in `missing_files' |
This file contains 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
namespace :update do | |
namespace :world_expeditions do | |
task :fetch do | |
monitor = Rowlf.monitor("world_expeditions") | |
monitor.start '.fetch.rake.task', 1 do |progress| | |
json_doc = JSON.pretty_generate(RowlfTours::WorldExpeditions::Provider.new.wrapper.render) | |
File.open("tmp/world_expeditions/trips.json", 'w') {|f| f.write(json_doc) } | |
end | |
end |
This file contains 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
task :fetch do | |
FileUtils.mkdir_p('tmp/intrepid') | |
json = RowlfTours::Intrepid::Provider.new.render.to_json | |
File.open("tmp/intrepid/trips.json", 'w') {|f| f.write(json) } | |
end |
This file contains 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
GIT | |
remote: git@github.com:lonelyplanet/rowlf-tours.git | |
revision: c44760e28a13ab83cdd1333ea6a9737259ce9c3e | |
specs: | |
rowlf_tours (0.0.1) | |
activesupport (~> 3.2.0) | |
confstruct | |
faraday | |
nokogiri | |
nori (= 2.0.3) |