Re: First time on Camping

2010-06-18 Thread Magnus Holm
Excellent!

Camping uses Rack, so it should be very simple to get it running on
any Ruby web server. Just create a config.ru like this:

  require 'list'
  List.create if List.respond_to?(:create) # call List.create if it exists
  run List # and run the app!

Then you can start it with: `thin start` (when you're in the app directory)

One thing you'll have to remember is that any exceptions which are
raised, won't be rescued inside Camping, but rather be raised all the
way up. Thin (hopefully) catches it somewhere, but you should probably
handle it yourself:

module List
  def r500(klass, method, exception)
# Do some funky things
There was an exception in #{klass}.#{method}: #{exception}
  end
end

You could also use something like http://hoptoadapp.com/ (they have
free plans) which gives you a nice dashboard and sends you an email
every time an exception is raised. Just create an account, run `gem
install toadhopper` and add this to your app:

require 'toadhopper'

module List
  ExceptionHandler = Toadhopper.new(YOUR API KEY)
  def r500(klass, method, exception)
# Send the exception to Hoptoad:
ExceptionHandler.post!(exception)
# Render something for the user. You would probably want to render some XML
# so the client knows something went wrong.
There was an exception in #{klass}.#{method}: #{exception}
  end
end

// Magnus Holm



On Fri, Jun 18, 2010 at 13:23, Raimon Fernandez co...@montx.com wrote:
 buf, now I'm lost ...

 :-))

 no, really, thanks for that info, now I have working as I want ...

 :-)


 I've tested and created a new databse, and is working also.

 I've created a new sqlite3 from terminal and filled-up with some data and now 
 I can use this databse from Camping, cool!

 And, caping is serving the data with .xml format and I can get it from my 
 devices, cool!

 I'm going to play more with thise, sure I'll come back with more questions ...

 :-)

 ah, I always use Thin with Nginx for my RoR instead of Mongrel, I suppose 
 there would be no problem with camping ?

 and speed: normally it's all very fast, but sometimes, it takes a little bit 
 (3 or more seconds) to respond camping, and I'm not doing nothing serious at 
 all, just the example from pastie.

 is because I'm using the development mode instead of production, like in RoR ?

 thanks again !

 regards,

 r.



 On 18jun, 2010, at 12:33 , Magnus Holm wrote:

 Yeah, people always get a little confused because you don't need to
 define your database when you're using bin/camping (it has a default
 SQLite database at ~/.camping.db).

 I also see that there's some old, database code here; we definitely
 need to update our documentation (yes, I'm working on it!)

 First of all, the table name should be list_people (since people
 is the plural to person and the table names are always in
 lowercase), but you should rather do `create_table Person.table_name`
 and `drop_table Person.table_name` because then you don't need to
 think about it at all :-)

 Secondly, you only need this in order to create the database:

 def List.create
  List::Models.create_schema
 end

 Then it will use a SQLite database at ~/.camping.db (as long as you
 start it with `camping list.rb`). This is perfect for just testing
 things out (you can also run `camping -C list.rb` to get an IRB
 console). Please note that if you only run `camping list.rb`, you'll
 have to load the page in the browser before the migrations run.

 If you want to use a specific database, you can add this:

 def List.create
  List::Models::Base.establish_connection(
    :adapter = postgresql,
    :username = root,
    :password = toor,
    :database = list
  )
  List::Models.create_schema
 end

 Or you might want to add the information in a database.yml file:

 ---
 adapter: postgresql
 username: root
 password: toor
 database: list

 And then rather do:

 require 'yaml'

 def List.create
  List::Models::Base.establish_connection(YAML.load(File.read(database.yml)))
  List::Models.create_schema
 end

 Please note that if you connect to a database which already has the
 tables, DON'T run `List::Models.create_schema` as this will probably
 delete the whole database. General rule: you only need migrations to
 setup the database.

 --

 And thirdly: Yes, we are aware of that the migration support isn't
 very nice. In the future we hope to have something like:

 module List::Models
  class Person
    t.string :name
  end
 end

 def List.create
  List::Models.setup!
 end

 Until then, you'll have to stick with the current solution :-)


 // Magnus Holm



 On Fri, Jun 18, 2010 at 11:09, Raimon Fernandez co...@montx.com wrote:

 On 17jun, 2010, at 21:04 , Magnus Holm wrote:


 That's (hopefully) the simplest way to generate XML with Camping.

 You still need to create a model to store/retrieve the data. Before we
 can help you here, we need to know a few things: Is it going to fetch
 data from a specific place, or should it create its own database (from
 scratch)? Any 

Re: First time on Camping

2010-06-18 Thread Magnus Holm
Oh, and I also have the speed issue! That's definitely a bug. I'll
have a look at it later...

On Friday, June 18, 2010, Raimon Fernandez co...@montx.com wrote:
 buf, now I'm lost ...

 :-))

 no, really, thanks for that info, now I have working as I want ...

 :-)


 I've tested and created a new databse, and is working also.

 I've created a new sqlite3 from terminal and filled-up with some data and now 
 I can use this databse from Camping, cool!

 And, caping is serving the data with .xml format and I can get it from my 
 devices, cool!

 I'm going to play more with thise, sure I'll come back with more questions ...

 :-)

 ah, I always use Thin with Nginx for my RoR instead of Mongrel, I suppose 
 there would be no problem with camping ?

 and speed: normally it's all very fast, but sometimes, it takes a little bit 
 (3 or more seconds) to respond camping, and I'm not doing nothing serious at 
 all, just the example from pastie.

 is because I'm using the development mode instead of production, like in RoR ?

 thanks again !

 regards,

 r.



 On 18jun, 2010, at 12:33 , Magnus Holm wrote:

 Yeah, people always get a little confused because you don't need to
 define your database when you're using bin/camping (it has a default
 SQLite database at ~/.camping.db).

 I also see that there's some old, database code here; we definitely
 need to update our documentation (yes, I'm working on it!)

 First of all, the table name should be list_people (since people
 is the plural to person and the table names are always in
 lowercase), but you should rather do `create_table Person.table_name`
 and `drop_table Person.table_name` because then you don't need to
 think about it at all :-)

 Secondly, you only need this in order to create the database:

 def List.create
  List::Models.create_schema
 end

 Then it will use a SQLite database at ~/.camping.db (as long as you
 start it with `camping list.rb`). This is perfect for just testing
 things out (you can also run `camping -C list.rb` to get an IRB
 console). Please note that if you only run `camping list.rb`, you'll
 have to load the page in the browser before the migrations run.

 If you want to use a specific database, you can add this:

 def List.create
  List::Models::Base.establish_connection(
    :adapter = postgresql,
    :username = root,
    :password = toor,
    :database = list
  )
  List::Models.create_schema
 end

 Or you might want to add the information in a database.yml file:

 ---
 adapter: postgresql
 username: root
 password: toor
 database: list

 And then rather do:

 require 'yaml'

 def List.create
  List::Models::Base.establish_connection(YAML.load(File.read(database.yml)))
  List::Models.create_schema
 end

 Please note that if you connect to a database which already has the
 tables, DON'T run `List::Models.create_schema` as this will probably
 delete the whole database. General rule: you only need migrations to
 setup the database.

 --

 And thirdly: Yes, we are aware of that the migration support isn't
 very nice. In the future we hope to have something like:

 module List::Models
  class Person
    t.string :name
  end
 end

 def List.create
  List::Models.setup!
 end

 Until then, you'll have to stick with the current solution :-)


 // Magnus Holm



 On Fri, Jun 18, 2010 at 11:09, Raimon Fernandez co...@montx.com wrote:

 On 17jun, 2010, at 21:04 , Magnus Holm wrote:


 That's (hopefully) the simplest way to generate XML with Camping.

 You still need to create a model to store/retrieve the data. Before we
 can help you here, we need to know a few things: Is it going to fetch
 data from a specific place, or should it create its own database (from
 scratch)? Any specific database you want to use?

 Here's a Pastie with all the code: http://pastie.org/1008983 (Should
 work on any version of Camping).

 I'm trying to adapt your pastie to use a sqlite databse, but I'm having 
 some errors that I can't see ...

 Here's a Pastie with all code: http://pastie.org/1009797

 I'm just trying to create with code a simple table called Persons with some 
 fields but ...

 :-)

 Also,  I can't find where is creating the database ...

 thanks,

 regards,

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list

-- 
// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time on Camping

2010-06-18 Thread Raimon Fernandez
Hi again,

I know this is more related to builder than to camping, but not sure where to 
ask for it ...

:-)


My app receives .xml file from some different sources, and all of them, except 
the camping one, are formatted like this:


?xml version=1.0 encoding=UTF-8?
person
  nameJim Fernández/name
  phone555-1234/phone
/person


but camping is formatting like this:

?xml version=1.0 encoding=UTF-8?
person
  nameJim Fern#225;ndez/name
  phone555-1234/phone
/person


The main difference is the encoding for some chars:

á = #225;

I can't find in builder how to write values without escaping them ...

thanks,

r.

On 17jun, 2010, at 21:04 , Magnus Holm wrote:

 And if you want this XML:
 
 ?xml version=1.0 encoding=UTF-8?
 posts
  post
titleHiya/title
contentHey/content
  /post
 /posts
 
 You have this view:
 
 module App::Views
  def posts(xml)
xml.posts do
  @posts.each do |post|
xml.post do
  xml.title(post.title)
  xml.content(post.content)
end
  end
end
  end
 end


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-18 Thread Dave Everitt
Hmm - quickly: in similar setups this usually requires UTF-8 to be  
specified throughout Camping(?), the database, within your files (and  
any markup files they generate), and (sometimes) also on the server.  
Then you can just use/store/retrieve the characters as they are - Dave E



The main difference is the encoding for some chars:

á = #225;


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-18 Thread Magnus Holm
This shouldn't be a problem, because that's the way to add non-ASCII
characters to XML documents. A proper XML parser should handle it...

// Magnus Holm (from my phone)

On Friday, June 18, 2010, Raimon Fernandez co...@montx.com wrote:
 Hi again,

 I know this is more related to builder than to camping, but not sure where to 
 ask for it ...

 :-)


 My app receives .xml file from some different sources, and all of them, 
 except the camping one, are formatted like this:


 ?xml version=1.0 encoding=UTF-8?
 person
   nameJim Fernández/name
   phone555-1234/phone
 /person


 but camping is formatting like this:

 ?xml version=1.0 encoding=UTF-8?
 person
   nameJim Fern#225;ndez/name
   phone555-1234/phone
 /person


 The main difference is the encoding for some chars:

 á = #225;

 I can't find in builder how to write values without escaping them ...

 thanks,

 r.

 On 17jun, 2010, at 21:04 , Magnus Holm wrote:

 And if you want this XML:

 ?xml version=1.0 encoding=UTF-8?
 posts
  post
    titleHiya/title
    contentHey/content
  /post
 /posts

 You have this view:

 module App::Views
  def posts(xml)
    xml.posts do
     �...@posts.each do |post|
        xml.post do
          xml.title(post.title)
          xml.content(post.content)
        end
      end
    end
  end
 end


 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list


-- 
// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time on Camping

2010-06-17 Thread Magnus Holm
Hey Raimon,

I see that you've been experimenting with Camping and Reststop lately,
and just thought I should chime in a bit.

You definitely don't *need* Reststop in order to achieve what you
want, so it might be a good idea to just leave Reststop until it gets
a little more robust. Let's see how we can tackle your problem with
Camping only:

For serving XML, you can use Builder (http://builder.rubyforge.org/).
Here's a little helper for you:

require 'camping'
require 'builder'

Camping.goes :App

module App
  # We include the Views module so we can call them as methods.
  include Views

  module Helpers
def xml(name)
  # We'll need to send this as text/xml
  @headers[Content-Type] = text/xml
  result = String.new
  # The builder takes a `target` where the XML will end up
  builder = Builder::XmlMarkup.new(:target = result, :indent = 2)
  # Generates a ?xml version=1.0 encoding=UTF-8 ?
  builder.instruct!
  # Calls the method you sent in, passing in the builder as an argument
  send(name, builder)
  # Return the restult
  result
end
  end
end



If you for instance want to generate this XML:

posts
  post title=Post titleContent of post/post
/posts

You would have the following view:

module App::Views
  def posts(xml)
xml.posts do
  @posts.each do |post|
xml.post(post.content, :title = post.title)
  end
end
  end
end

And if you want this XML:

?xml version=1.0 encoding=UTF-8?
posts
  post
titleHiya/title
contentHey/content
  /post
/posts

You have this view:

module App::Views
  def posts(xml)
xml.posts do
  @posts.each do |post|
xml.post do
  xml.title(post.title)
  xml.content(post.content)
end
  end
end
  end
end

-

You render the XML in the controller like this:

module App::Controllers
  class Index
def get
  # The view has access to this variable
  @posts = Post.all
  # Calls the helper, which in turn calls the view
  xml :posts
end
  end
end



That's (hopefully) the simplest way to generate XML with Camping.

You still need to create a model to store/retrieve the data. Before we
can help you here, we need to know a few things: Is it going to fetch
data from a specific place, or should it create its own database (from
scratch)? Any specific database you want to use?

Here's a Pastie with all the code: http://pastie.org/1008983 (Should
work on any version of Camping).

// Magnus Holm



On Tue, Jun 8, 2010 at 08:25, Raimon Fernandez co...@montx.com wrote:
 hi list,


 This is my first time here, my first time reading seriously something about 
 Camping.

 I need to create a very simple web server for serving only .xml files, 
 extracted from a sqlite database with some queries.

 I'm quite comfortable with Ruby on Rails, but it would be too much for this 
 project, so I've decided to take a look at Camping or Sinatra, not sure 
 what's the best option.

 There would be only 5 tables, 100 rows per table, and the idea is fetch data 
 from a device like iPad/iPhone/iPod, update it and persist the changes in the 
 server. The data transfer would be in plain .xml files, no html or css.

 Any helpful directions would be great

 :-)

 thanks,

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-17 Thread Matt Zukowski
Something's not right with your rubygems install maybe try `gem update
--system` first?

On Tue, Jun 8, 2010 at 3:33 PM, Raimon Fernandez co...@montx.com wrote:


 On 8jun, 2010, at 21:18 , David Susco wrote:

  Is the hoe gem installed?

 no, the same error as before:

 Last login: Tue Jun  8 18:43:33 on ttys002
 MacBook-ProII-2:~ montx$ sudo gem install hoe
 Password:
 ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: nodename nor servname provided, or not known (
 http://gems.rubyforge.org/gems/json_pure-1.4.3.gem)
 MacBook-ProII-2:~ montx$


 we have to wait ...

 thanks,

 r.

 
  Dave
 
  On Tue, Jun 8, 2010 at 1:01 PM, Raimon Fernandez co...@montx.com
 wrote:
 
  On 8jun, 2010, at 18:43 , David Susco wrote:
 
  I don't believe the gem has been updated to include Matt's or
  Philippe's latest changes. You could clone it from GitHub though and
  rake and install it yourself.
 
  I think it requieres 'hoe' and I can't install without rubygems working
 or once again, find where the repo is and start digging again ...
 
  :-)
 
  MacBook-ProII-2:reststop montx$ sudo rake Rakefile
  (in /Users/montx/Documents/Camping/reststop)
  rake aborted!
  no such file to load -- hoe
  /Users/montx/Documents/Camping/reststop/rakefile:10
 
 
  thanks!
 
  r.
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
 
 
 
  --
  Dave
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 


 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Where I can find Reststop-based blog.rb?

2010-06-09 Thread Raimon Fernandez
Hi Bartosz,

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

 It should come with the gem, in examples directory. You can also find
 it here: http://github.com/camping/camping/blob/master/examples/blog.rb

This version doesn't use reststop.

The one that is included in the examples, it does, but has some errors:

MacBook-ProII-2:examples montx$ camping blog.rb 
** Starting Mongrel on 0.0.0.0:3301
!! Error loading /Users/montx/Documents/Camping/reststop/examples/blog.rb:
NameError: uninitialized constant Logger
/Library/Ruby/Site/1.8/reststop.rb:43
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:32
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load_apps'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:105:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:180:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `each'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:158:in
 `update'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:157:in 
`find_scripts'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:161:in 
`reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:169:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
...

So I've added:

require 'Logger'

and started again camping:

MacBook-ProII-2:examples montx$ camping blog.rb 
** Starting Mongrel on 0.0.0.0:3301
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:172:
 warning: already initialized constant VERSION
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:174:
 warning: already initialized constant ProgName
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:181:
 warning: already initialized constant DEBUG
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:182:
 warning: already initialized constant INFO
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:183:
 warning: already initialized constant WARN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:184:
 warning: already initialized constant ERROR
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:185:
 warning: already initialized constant FATAL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:186:
 warning: already initialized constant UNKNOWN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:424:
 warning: already initialized constant SEV_LABEL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:436:
 warning: already initialized constant Format
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:537:
 warning: already initialized constant SiD
Creating RESTful controller for posts using Reststop pull version number here
Creating RESTful controller for comments using Reststop pull version number 
here
Creating RESTful controller for sessions using Reststop pull version number 
here
127.0.0.1 - - [09/Jun/2010 08:28:07] GET / HTTP/1.1 404 45 0.4875

And in the browser, I see:

Camping problem!
/not found


and If I force the login:

http://127.0.0.1:3301/login

Plenty of errors again ...

RuntimeError: Can't find template _login
(eval):16:in `camping_render'
/Library/Ruby/Site/1.8/reststop.rb:135:in `render'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:101:in `get'
(eval):27:in `send'
(eval):27:in `camping_service'
(eval):27:in `catch'
(eval):27:in `camping_service'
/Library/Ruby/Site/1.8/reststop.rb:53:in `service'
(eval):38:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in 
`call'
(eval):42:in `call'

/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in 
`call'


Re: Where I can find Reststop-based blog.rb?

2010-06-09 Thread Philippe Monnet

Hi Raimon,

I did a quick test this morning and it looks like some change in Camping 
after version 2.0 impacted RESTstop. By reverting to camping-2.0 I was 
able to run the blog example. I will need to investigate what the issue 
is. Also I realized that a couple things need to be done:
  a) publish a new version of the reststop gem (as the current one no 
longer matches the current camping/reststop project code on GitHub
  b) merge some of my changes from March re: the RESTR library and 
publish a new gem


Philippe

PS - eventually I will write a blog post on this ;-)

On 6/9/2010 12:31 AM, Raimon Fernandez wrote:

Hi Bartosz,

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

   

It should come with the gem, in examples directory. You can also find
it here: http://github.com/camping/camping/blob/master/examples/blog.rb
 

This version doesn't use reststop.

The one that is included in the examples, it does, but has some errors:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
!! Error loading /Users/montx/Documents/Camping/reststop/examples/blog.rb:
NameError: uninitialized constant Logger
/Library/Ruby/Site/1.8/reststop.rb:43
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:32
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load_apps'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:105:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:180:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `each'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:158:in
 `update'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:157:in 
`find_scripts'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:161:in 
`reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:169:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
...

So I've added:

require 'Logger'

and started again camping:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:172:
 warning: already initialized constant VERSION
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:174:
 warning: already initialized constant ProgName
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:181:
 warning: already initialized constant DEBUG
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:182:
 warning: already initialized constant INFO
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:183:
 warning: already initialized constant WARN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:184:
 warning: already initialized constant ERROR
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:185:
 warning: already initialized constant FATAL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:186:
 warning: already initialized constant UNKNOWN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:424:
 warning: already initialized constant SEV_LABEL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:436:
 warning: already initialized constant Format
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:537:
 warning: already initialized constant SiD
Creating RESTful controller for posts using Reststop pull version number here
Creating RESTful controller for comments using Reststop pull version number 
here
Creating RESTful controller for sessions using Reststop pull version number 
here
127.0.0.1 - - [09/Jun/2010 08:28:07] GET / HTTP/1.1 404 45 0.4875

And in the browser, I see:

Camping problem!
/not found


and If I force the login:

http://127.0.0.1:3301/login

Plenty of errors again ...

RuntimeError: Can't find template _login
(eval):16:in `camping_render'
/Library/Ruby/Site/1.8/reststop.rb:135:in `render'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:101:in `get'
(eval):27:in `send'
(eval):27:in `camping_service'
(eval):27:in `catch'
(eval):27:in `camping_service'
/Library/Ruby/Site/1.8/reststop.rb:53:in 

Re: Where I can find Reststop-based blog.rb?

2010-06-09 Thread Philippe Monnet
Hi Matt, I just forked restr and added cookie support. Could you pull my 
changes and republish the gem?


On 6/9/2010 10:21 AM, Matt Zukowski wrote:


hey Philippe, thanks for raking care of the support on this. I've been 
badly neglecting my camping projects lately due to time constraints... 
let me know if there's anything I can do to help with the reststop gem 
push (gemcutter/rubyforge access?)


On 2010-06-09 8:17 AM, Philippe Monnet r...@monnet-usa.com 
mailto:r...@monnet-usa.com wrote:


Hi Raimon,

I did a quick test this morning and it looks like some change in 
Camping after version 2.0 impacted RESTstop. By reverting to 
camping-2.0 I was able to run the blog example. I will need to 
investigate what the issue is. Also I realized that a couple things 
need to be done:
  a) publish a new version of the reststop gem (as the current one no 
longer matches the current camping/reststop project code on GitHub
  b) merge some of my changes from March re: the RESTR library and 
publish a new gem


Philippe

PS - eventually I will write a blog post on this ;-)



On 6/9/2010 12:31 AM, Raimon Fernandez wrote:

 Hi Bartosz,

 On 8jun, 2010, at 20:31 , Bartos...


___
Camping-list mailing list
Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Where I can find Reststop-based blog.rb?

2010-06-09 Thread Philippe Monnet

Matt,

Do you have the gemspec file for RESTStop? Could you add it to GitHub 
and I can update the version number and push it to RubyGems?


I figured out what the issue was. With Camping 2.0.392 (Tilt support), 
the render method looks for view methods in either the Views module or 
in the views folder (for example to find the haml version of the view). 
Since in RESTstop the Views module has 2 submodules: HTML and XML, I 
needed to adapt the new lookup method of Camping to have a chance to 
look in the HTML module first and then delegate to the base Camping 
method. I have committed my changes and tested them with an updated 
version of blog.rb.


Philippe

On 6/9/2010 7:09 AM, Philippe Monnet wrote:

Hi Raimon,

I did a quick test this morning and it looks like some change in 
Camping after version 2.0 impacted RESTstop. By reverting to 
camping-2.0 I was able to run the blog example. I will need to 
investigate what the issue is. Also I realized that a couple things 
need to be done:
  a) publish a new version of the reststop gem (as the current one no 
longer matches the current camping/reststop project code on GitHub
  b) merge some of my changes from March re: the RESTR library and 
publish a new gem


Philippe

PS - eventually I will write a blog post on this ;-)

On 6/9/2010 12:31 AM, Raimon Fernandez wrote:

Hi Bartosz,

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

   

It should come with the gem, in examples directory. You can also find
it here:http://github.com/camping/camping/blob/master/examples/blog.rb
 

This version doesn't use reststop.

The one that is included in the examples, it does, but has some errors:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
!! Error loading /Users/montx/Documents/Camping/reststop/examples/blog.rb:
NameError: uninitialized constant Logger
/Library/Ruby/Site/1.8/reststop.rb:43
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:32
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load_apps'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:105:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:180:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `each'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:158:in
 `update'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:157:in 
`find_scripts'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:161:in 
`reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:169:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
...

So I've added:

require 'Logger'

and started again camping:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:172:
 warning: already initialized constant VERSION
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:174:
 warning: already initialized constant ProgName
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:181:
 warning: already initialized constant DEBUG
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:182:
 warning: already initialized constant INFO
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:183:
 warning: already initialized constant WARN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:184:
 warning: already initialized constant ERROR
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:185:
 warning: already initialized constant FATAL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:186:
 warning: already initialized constant UNKNOWN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:424:
 warning: already initialized constant SEV_LABEL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:436:
 warning: already initialized constant Format
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:537:
 warning: already initialized constant SiD
Creating RESTful controller for posts using Reststop pull version number here
Creating RESTful controller for comments using Reststop pull 

Re: Where I can find Reststop-based blog.rb?

2010-06-09 Thread Philippe Monnet

Raimon,

I have committed a bunch of code fixes and added a wiki page to reststop 
on GitHub.

If you want to upgrade you will need to do the following:

  1. Get the latest source (we'll update the gem soon)
  2. Use the new blog.rb
  3.   If you have customized it or created your own service you will
 also need to replace the ::Base module with the contents from the
 Blog::Base (there is a new alias statement and a new method
 definition)

Testing is easy if you use IRB + restr + TcpTrace. See the new wiki page 
for details.


Philippe

On 6/9/2010 9:19 AM, Raimon Fernandez wrote:

Hi Philippe,


On 9jun, 2010, at 15:09 , Philippe Monnet wrote:


Hi Raimon,

I did a quick test this morning and it looks like some change in 
Camping after version 2.0 impacted RESTstop. By reverting to 
camping-2.0 I was able to run the blog example. I will need to 
investigate what the issue is. Also I realized that a couple things 
need to be done:
  a) publish a new version of the reststop gem (as the current one no 
longer matches the current camping/reststop project code on GitHub
  b) merge some of my changes from March re: the RESTR library and 
publish a new gem


Philippe

PS - eventually I will write a blog post on this ;-)


ok,

uninstalled current camping 2.0.392 and installed the gem camping 2.0 
and ...


it's working better as before :-)

the default page is never found, but if I force for example the login, 
all is working fine


:-)

now I can focus on camping and how to send xml files instead of html

thanks!

regards,

raimon




On 6/9/2010 12:31 AM, Raimon Fernandez wrote:

Hi Bartosz,

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

   

It should come with the gem, in examples directory. You can also find
it here:http://github.com/camping/camping/blob/master/examples/blog.rb
 

This version doesn't use reststop.

The one that is included in the examples, it does, but has some errors:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
!! Error loading /Users/montx/Documents/Camping/reststop/examples/blog.rb:
NameError: uninitialized constant Logger
/Library/Ruby/Site/1.8/reststop.rb:43
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/montx/Documents/Camping/reststop/examples/blog.rb:32
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:60:in
 `load_apps'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:105:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:180:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `each'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:179:in
 `reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/reloader.rb:158:in
 `update'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:157:in 
`find_scripts'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:161:in 
`reload!'
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:169:in 
`call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
...

So I've added:

require 'Logger'

and started again camping:

MacBook-ProII-2:examples montx$ camping blog.rb
** Starting Mongrel on 0.0.0.0:3301
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:172:
 warning: already initialized constant VERSION
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:174:
 warning: already initialized constant ProgName
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:181:
 warning: already initialized constant DEBUG
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:182:
 warning: already initialized constant INFO
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:183:
 warning: already initialized constant WARN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:184:
 warning: already initialized constant ERROR
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:185:
 warning: already initialized constant FATAL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:186:
 warning: already initialized constant UNKNOWN
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:424:
 warning: already initialized constant SEV_LABEL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:436:
 warning: already initialized 

Re: First time and first error

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 09:18 , Raimon Fernandez wrote:

 Hi again,
 
 
 I'm trying to install Camping on my OS X but I'm getting some errors:
 
 MacBook-ProII-2:~ montx$ gem -v
 1.3.5
 
 MacBook-ProII-2:~ montx$ sudo gem install camping
 WARNING:  RubyGems 1.2+ index not found for:
   http://gems.rubyforge.org/
 
 RubyGems will revert to legacy indexes degrading performance.
 Bulk updating Gem source index for: http://gems.rubyforge.org/
 ERROR:  While executing gem ... (Gem::RemoteSourceException)
Error fetching remote gem cache: SocketError: getaddrinfo: nodename nor 
 servname provided, or not known (http://gems.rubyforge.org/yaml)
 
 
 What are the minimums ?
 
 I'm using in my developer machine Ruby On Rails and Ruby without any 
 problems, with some gems.


I want to add that I'm not behind any proxy or firewall, and that I could 
successfully download/and install some other gems in this machine without any 
problems, but no, no, I can't install nothing from gem.

It seems like a time-out problem:

I have this remote sources:

  - REMOTE SOURCES:
 - http://gems.rubyforge.org/
 - http://gems.github.com
MacBook-ProII-2:~ montx$ 

mmm, a ping to http://gems.rubyforge.org/ = cannot resolve 
http://gems.rubyforge.org/: Unknown host


MacBook-ProII-2:~ montx$ sudo gem sources -r http://gems.rubyforge.org/
http://gems.rubyforge.org/ removed from sources

now I have only  - http://gems.github.com

MacBook-ProII-2:~ montx$ sudo gem install camping
ERROR:  could not find gem camping locally or in a repository
MacBook-ProII-2:~ montx$ 

any idea ?

thanks,


r.





 
 thanks,
 
 regards,
 
 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Magnus Holm
Hey Raimon,

Try a `sudo gem update --system` first to upgrade to the latest RubyGems

// Magnus Holm



On Tue, Jun 8, 2010 at 10:59, Raimon Fernandez co...@montx.com wrote:

 On 8jun, 2010, at 09:18 , Raimon Fernandez wrote:

 Hi again,


 I'm trying to install Camping on my OS X but I'm getting some errors:

 MacBook-ProII-2:~ montx$ gem -v
 1.3.5

 MacBook-ProII-2:~ montx$ sudo gem install camping
 WARNING:  RubyGems 1.2+ index not found for:
       http://gems.rubyforge.org/

 RubyGems will revert to legacy indexes degrading performance.
 Bulk updating Gem source index for: http://gems.rubyforge.org/
 ERROR:  While executing gem ... (Gem::RemoteSourceException)
    Error fetching remote gem cache: SocketError: getaddrinfo: nodename nor 
 servname provided, or not known (http://gems.rubyforge.org/yaml)


 What are the minimums ?

 I'm using in my developer machine Ruby On Rails and Ruby without any 
 problems, with some gems.


 I want to add that I'm not behind any proxy or firewall, and that I could 
 successfully download/and install some other gems in this machine without any 
 problems, but no, no, I can't install nothing from gem.

 It seems like a time-out problem:

 I have this remote sources:

  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com
 MacBook-ProII-2:~ montx$

 mmm, a ping to http://gems.rubyforge.org/ = cannot resolve 
 http://gems.rubyforge.org/: Unknown host


 MacBook-ProII-2:~ montx$ sudo gem sources -r http://gems.rubyforge.org/
 http://gems.rubyforge.org/ removed from sources

 now I have only      - http://gems.github.com

 MacBook-ProII-2:~ montx$ sudo gem install camping
 ERROR:  could not find gem camping locally or in a repository
 MacBook-ProII-2:~ montx$

 any idea ?

 thanks,


 r.






 thanks,

 regards,

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time and first error

2010-06-08 Thread Dave Everitt

Hi Raimon

I'm having the same problem with rubygems.org - won't even load in a  
browser.


In February there was a bit of a change:
http://update.gemcutter.org/2010/02/20/rubygems-org-move-complete.html

Fro current status see the tweets here:
http://twitter.com/gemcutter

and Magnus' Temporary fix:
add 72.4.120.124 rubygems.org to your /etc/hosts

Otherwise, get the bleeding edge version:
sudo gem install camping --source http://gems.judofyr.net/

Dave Everitt

I want to add that I'm not behind any proxy or firewall, and that I  
could successfully download/and install some other gems in this  
machine without any problems, but no, no, I can't install nothing  
from gem.


It seems like a time-out problem:

I have this remote sources:

  - REMOTE SOURCES:
 - http://gems.rubyforge.org/
 - http://gems.github.com
MacBook-ProII-2:~ montx$

mmm, a ping to http://gems.rubyforge.org/ = cannot resolve http:// 
gems.rubyforge.org/: Unknown host



MacBook-ProII-2:~ montx$ sudo gem sources -r http:// 
gems.rubyforge.org/

http://gems.rubyforge.org/ removed from sources

now I have only  - http://gems.github.com

MacBook-ProII-2:~ montx$ sudo gem install camping
ERROR:  could not find gem camping locally or in a repository
MacBook-ProII-2:~ montx$


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez
Hi Dave,

On 8jun, 2010, at 11:52 , Dave Everitt wrote:

 Hi Raimon
 
 I'm having the same problem with rubygems.org - won't even load in a browser.

ok,


 In February there was a bit of a change:
 http://update.gemcutter.org/2010/02/20/rubygems-org-move-complete.html
 
 Fro current status see the tweets here:
 http://twitter.com/gemcutter

thanks for the info!


 and Magnus' Temporary fix:
 add 72.4.120.124 rubygems.org to your /etc/hosts

ok, done!

mmm, I've removed the rubygems.org from the remote sources and now I can't add 
it again


MacBook-ProII-2:~ montx$ sudo gem sources -a http://rubygems.org
Error fetching http://rubygems.org:
SocketError: getaddrinfo: nodename nor servname provided, or not known 
(http://rubygems.org/specs.4.8.gz)


MacBook-ProII-2:~ montx$ sudo gem sources -a http://rubygems.org
Error fetching http://rubygems.org:
SocketError: getaddrinfo: nodename nor servname provided, or not known 
(http://rubygems.org/specs.4.8.gz)

 Otherwise, get the bleeding edge version:
 sudo gem install camping --source http://gems.judofyr.net/

maybe later !

:-)

thanks,

regards,

r.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 11:52 , Dave Everitt wrote:

 Otherwise, get the bleeding edge version:
 sudo gem install camping --source http://gems.judofyr.net/

ok, I want to focus on Camping so I've installed the edge version without any 
problems :-)

the problem is when I try to execute some example:

acBook-ProII-2:Camping montx$ camping homepage.rb 
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:27: 
uninitialized constant Rack::Server (NameError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/camping:6
from /usr/bin/camping:19:in `load'
from /usr/bin/camping:19


I've installed Rack as I use it with some of my Ruby On Rails and Thin projects 
...

Maybe the Rack::Server is not the same ?

Should I install more dependencies ?

thanks,

r.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 11:34 , Magnus Holm wrote:

 Hey Raimon,
 
 Try a `sudo gem update --system` first to upgrade to the latest RubyGems
 
 // Magnus Holm

MacBook-ProII-2:~ montx$ sudo gem update --system
Password:
Updating RubyGems
Nothing to update
MacBook-ProII-2:~ montx$ 


thanks,

r.


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Magnus Holm
I believe Rack::Server was introduced in one of the later Rack
versions. Looks like I forgot to update the version dependency. Are
you able to install the latest rack (gem install rack), or is
rubygems.org fully down?


// Magnus Holm



On Tue, Jun 8, 2010 at 12:25, Raimon Fernandez co...@montx.com wrote:

 On 8jun, 2010, at 11:52 , Dave Everitt wrote:

 Otherwise, get the bleeding edge version:
 sudo gem install camping --source http://gems.judofyr.net/

 ok, I want to focus on Camping so I've installed the edge version without any 
 problems :-)

 the problem is when I try to execute some example:

 acBook-ProII-2:Camping montx$ camping homepage.rb
 /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:27: 
 uninitialized constant Rack::Server (NameError)
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
        from /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/camping:6
        from /usr/bin/camping:19:in `load'
        from /usr/bin/camping:19


 I've installed Rack as I use it with some of my Ruby On Rails and Thin 
 projects ...

 Maybe the Rack::Server is not the same ?

 Should I install more dependencies ?

 thanks,

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time and first error

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 12:30 , Magnus Holm wrote:

 I believe Rack::Server was introduced in one of the later Rack
 versions. Looks like I forgot to update the version dependency. Are
 you able to install the latest rack (gem install rack), or is
 rubygems.org fully down?
 

I think is fully down because I can't install nothing from gem install ...

thanks,

r.

 
 // Magnus Holm


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Philippe Monnet

Hi Raimon,

Sounds like maybe you don't have Rack.
Do you have the following gem installed?
  - rack (1.1.0)
  - markaby (0.5) [will not work with a higher version]
  - activerecord (any version)
  - activesupport (any version)
If not gem install them and let us know.

Philippe

On 6/8/2010 4:25 AM, Raimon Fernandez wrote:

On 8jun, 2010, at 11:52 , Dave Everitt wrote:

   

Otherwise, get the bleeding edge version:
sudo gem install camping --source http://gems.judofyr.net/
 

ok, I want to focus on Camping so I've installed the edge version without any 
problems :-)

the problem is when I try to execute some example:

acBook-ProII-2:Camping montx$ camping homepage.rb
/Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:27: 
uninitialized constant Rack::Server (NameError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/camping:6
from /usr/bin/camping:19:in `load'
from /usr/bin/camping:19


I've installed Rack as I use it with some of my Ruby On Rails and Thin projects 
...

Maybe the Rack::Server is not the same ?

Should I install more dependencies ?

thanks,

r.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time and first error

2010-06-08 Thread Raimon Fernandez
Hi Philippe,

On 8jun, 2010, at 12:53 , Philippe Monnet wrote:

 Hi Raimon,
 
 Sounds like maybe you don't have Rack.
 Do you have the following gem installed?
   - rack (1.1.0)
   - markaby (0.5) [will not work with a higher version]
   - activerecord (any version)
   - activesupport (any version)
 If not gem install them and let us know.

those are my gems:

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.3.4, 2.2.2, 1.3.6)
actionpack (2.3.5, 2.3.4, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.5, 2.3.4, 2.2.2, 1.15.6)
activeresource (2.3.5, 2.3.4, 2.2.2)
activesupport (2.3.5, 2.3.4, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
builder (2.1.2)
camping (2.0.392)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
eventmachine (0.12.10)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (1.1.3, 1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.4, 2.0.1, 1.1.1)
net-ssh (2.0.19, 2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
pg (0.8.0)
prawn (0.7.1)
prawn-core (0.7.1)
prawn-layout (0.7.1)
prawn-security (0.7.1)
rack (1.0.1)
rails (2.3.5, 2.3.4, 2.2.2, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.7, 2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
rubyzip (0.9.1)
sqlite3-ruby (1.2.5, 1.2.4)
termios (0.9.4)
thin (1.2.5)
will_paginate (2.3.11)
xmpp4r (0.4)


I have to update rack and install markaby, but I can't, more info in the next 
post related.

thanks,

r.

 
 Philippe
 
 On 6/8/2010 4:25 AM, Raimon Fernandez wrote:
 
 On 8jun, 2010, at 11:52 , Dave Everitt wrote:
 
   
 Otherwise, get the bleeding edge version:
 sudo gem install camping --source http://gems.judofyr.net/
 
 ok, I want to focus on Camping so I've installed the edge version without 
 any problems :-)
 
 the problem is when I try to execute some example:
 
 acBook-ProII-2:Camping montx$ camping homepage.rb 
 /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:27: 
 uninitialized constant Rack::Server (NameError)
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
  from /Library/Ruby/Gems/1.8/gems/camping-2.0.392/bin/camping:6
  from /usr/bin/camping:19:in `load'
  from /usr/bin/camping:19
 
 
 I've installed Rack as I use it with some of my Ruby On Rails and Thin 
 projects ...
 
 Maybe the Rack::Server is not the same ?
 
 Should I install more dependencies ?
 
 thanks,
 
 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 
   
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: First time and first error

2010-06-08 Thread Raimon Fernandez
Hi David,

On 8jun, 2010, at 15:38 , Dave Everitt wrote:

 Hi Raimon
 
 Github is no longer maintaining this but the gems are still there, so try:
 
 --source http://gems.github.com

do you mean using like this ?

MacBook-ProII-2:~ montx$ sudo gem install rack --source http://gems.github.com
ERROR:  could not find gem rack locally or in a repository
MacBook-ProII-2:~ montx$ 


thanks,

r.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread David Susco
Camping with reststop ought will make serving the xml files easy
enough. The example on github ought to get you started:

http://github.com/camping/reststop

Dave

On Tue, Jun 8, 2010 at 2:25 AM, Raimon Fernandez co...@montx.com wrote:
 hi list,


 This is my first time here, my first time reading seriously something about 
 Camping.

 I need to create a very simple web server for serving only .xml files, 
 extracted from a sqlite database with some queries.

 I'm quite comfortable with Ruby on Rails, but it would be too much for this 
 project, so I've decided to take a look at Camping or Sinatra, not sure 
 what's the best option.

 There would be only 5 tables, 100 rows per table, and the idea is fetch data 
 from a device like iPad/iPhone/iPod, update it and persist the changes in the 
 server. The data transfer would be in plain .xml files, no html or css.

 Any helpful directions would be great

 :-)

 thanks,

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Dave Everitt

Hi Raimon

I did mean that, but the rubygems site is back up... and it looks  
like they're making progress as the error messages are changing. So  
maybe try again tomorrow?


Dave


Hi David,

On 8jun, 2010, at 15:38 , Dave Everitt wrote:


Hi Raimon

Github is no longer maintaining this but the gems are still there,  
so try:


--source http://gems.github.com


do you mean using like this ?

MacBook-ProII-2:~ montx$ sudo gem install rack --source http:// 
gems.github.com

ERROR:  could not find gem rack locally or in a repository
MacBook-ProII-2:~ montx$

thanks,

r.


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez
Hi David,

On 8jun, 2010, at 16:59 , Dave Everitt wrote:

 Hi Raimon
 
 I did mean that, but the rubygems site is back up... and it looks like 
 they're making progress as the error messages are changing.

ok

 So maybe try again tomorrow?


If I have to wait, I'll wait ... what can I do ?

:-)

I was 'excited' to do a demo tomorrow morning with camping and the devices but 
...

thanks!

regards,

r.



 
 Dave
 
 Hi David,
 
 On 8jun, 2010, at 15:38 , Dave Everitt wrote:
 
 Hi Raimon
 
 Github is no longer maintaining this but the gems are still there, so try:
 
 --source http://gems.github.com
 
 do you mean using like this ?
 
 MacBook-ProII-2:~ montx$ sudo gem install rack --source 
 http://gems.github.com
 ERROR:  could not find gem rack locally or in a repository
 MacBook-ProII-2:~ montx$
 
 thanks,
 
 r.
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread Raimon Fernandez
Hi Dave,

On 8jun, 2010, at 17:04 , David Susco wrote:

 Camping with reststop ought will make serving the xml files easy
 enough. The example on github ought to get you started:
 
 http://github.com/camping/reststop

thanks !

reststop is also a gem for camping ?

regards,



r.



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez
Hi Dave,


On 8jun, 2010, at 17:47 , Dave Everitt wrote:

 Raimon
 
 apologies, rack is not listed in the Github gems 
 (http://gems.github.com/list.html).
 
 BUT (still trying to get around the rubygems.org gem server issues and get 
 you started with Camping) you can try this mirror:
 
 sudo gem install rack --source http://chneukirchen.org/releases/gems/

ok, installed and running, now I'm a Camper!!!

:-)


Sure I'll come back here with more questions about Camping ...

thanks all!

regards,

r.


 see:
 http://docs.github.com/rack/rack/
 (FYI the actual rack 1.1 gem is mirrored here: 
 http://chneukirchen.org/releases/gems/gems/ but the above install should get 
 it)
 
 Dave
 
 MacBook-ProII-2:~ montx$ sudo gem install rack --source 
 http://gems.github.com
 
 ERROR:  could not find gem rack locally or in a repository
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Dave Everitt
Hi Raimon - welcome, glad we got around the rubygems.org fail :-) -  
Dave Everitt



sudo gem install rack --source http://chneukirchen.org/releases/gems/


ok, installed and running, now I'm a Camper!!!

:-)

Sure I'll come back here with more questions about Camping ...


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread David Susco
I don't believe the gem has been updated to include Matt's or
Philippe's latest changes. You could clone it from GitHub though and
rake and install it yourself.

Dave

On Tue, Jun 8, 2010 at 11:55 AM, Raimon Fernandez co...@montx.com wrote:
 Hi Dave,

 On 8jun, 2010, at 17:04 , David Susco wrote:

 Camping with reststop ought will make serving the xml files easy
 enough. The example on github ought to get you started:

 http://github.com/camping/reststop

 thanks !

 reststop is also a gem for camping ?

 regards,



 r.



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 18:19 , Dave Everitt wrote:

 Hi Raimon - welcome,

thanks!

 glad we got around the rubygems.org fail :-) 

hey, I need more workarounds .

:-)

I'm playing with Camping and the introduction found in 
http://camping.rubyforge.org/book/02_getting_started.html

Now I'm reading the Reststop documentation for serving .xml data, and here 
comes again the same error:

MacBook-ProII-2:~ montx$ sudo gem install restr
Password:
WARNING:  RubyGems 1.2+ index not found for:
http://gems.rubyforge.org/

RubyGems will revert to legacy indexes degrading performance.
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR:  While executing gem ... (Gem::RemoteSourceException)
Error fetching remote gem cache: SocketError: getaddrinfo: nodename nor 
servname provided, or not known (http://gems.rubyforge.org/yaml)

So the error is general, don't know if I can just clone the git repository of 
restr and install it using ruby setup.rb


thanks again for your help!

regards,

r.



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time and first error

2010-06-08 Thread Dave Everitt

Hi Raimon

don't know if I can just clone the git repository of restr and  
install it using ruby setup.rb


that seems the best way, as David Susco suggested:

I don't believe the gem has been updated to include Matt's or  
Philippe's latest changes. You could clone it from GitHub though  
and rake and install it yourself.




So the error is general



Indeed. We have no control over rubygems.org :-)

DaveE

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Where I can find Reststop-based blog.rb?

2010-06-08 Thread Raimon Fernandez
Hi again,


In Reststop docs they say a good example is the blog.rb, but their link is 
broken.

Where I can find it ?

thanks,

regards,

raimon
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 18:43 , David Susco wrote:

 I don't believe the gem has been updated to include Matt's or
 Philippe's latest changes. You could clone it from GitHub though and
 rake and install it yourself.

I think it requieres 'hoe' and I can't install without rubygems working or once 
again, find where the repo is and start digging again ...

:-)

MacBook-ProII-2:reststop montx$ sudo rake Rakefile 
(in /Users/montx/Documents/Camping/reststop)
rake aborted!
no such file to load -- hoe
/Users/montx/Documents/Camping/reststop/rakefile:10


thanks!

r.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Where I can find Reststop-based blog.rb?

2010-06-08 Thread Bartosz Dziewoński
2010/6/8, Raimon Fernandez co...@montx.com:
  In Reststop docs they say a good example is the blog.rb, but their link is 
 broken.

  Where I can find it ?

It should come with the gem, in examples directory. You can also find
it here: http://github.com/camping/camping/blob/master/examples/blog.rb

-- 
Matma Rex - http://matma-rex.prv.pl/
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread David Susco
Is the hoe gem installed?

Dave

On Tue, Jun 8, 2010 at 1:01 PM, Raimon Fernandez co...@montx.com wrote:

 On 8jun, 2010, at 18:43 , David Susco wrote:

 I don't believe the gem has been updated to include Matt's or
 Philippe's latest changes. You could clone it from GitHub though and
 rake and install it yourself.

 I think it requieres 'hoe' and I can't install without rubygems working or 
 once again, find where the repo is and start digging again ...

 :-)

 MacBook-ProII-2:reststop montx$ sudo rake Rakefile
 (in /Users/montx/Documents/Camping/reststop)
 rake aborted!
 no such file to load -- hoe
 /Users/montx/Documents/Camping/reststop/rakefile:10


 thanks!

 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: First time on Camping

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 21:18 , David Susco wrote:

 Is the hoe gem installed?

no, the same error as before:

Last login: Tue Jun  8 18:43:33 on ttys002
MacBook-ProII-2:~ montx$ sudo gem install hoe
Password:
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: nodename nor servname provided, or not known 
(http://gems.rubyforge.org/gems/json_pure-1.4.3.gem)
MacBook-ProII-2:~ montx$ 


we have to wait ...

thanks,

r.

 
 Dave
 
 On Tue, Jun 8, 2010 at 1:01 PM, Raimon Fernandez co...@montx.com wrote:
 
 On 8jun, 2010, at 18:43 , David Susco wrote:
 
 I don't believe the gem has been updated to include Matt's or
 Philippe's latest changes. You could clone it from GitHub though and
 rake and install it yourself.
 
 I think it requieres 'hoe' and I can't install without rubygems working or 
 once again, find where the repo is and start digging again ...
 
 :-)
 
 MacBook-ProII-2:reststop montx$ sudo rake Rakefile
 (in /Users/montx/Documents/Camping/reststop)
 rake aborted!
 no such file to load -- hoe
 /Users/montx/Documents/Camping/reststop/rakefile:10
 
 
 thanks!
 
 r.
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 
 
 
 
 -- 
 Dave
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Where I can find Reststop-based blog.rb?

2010-06-08 Thread Raimon Fernandez

On 8jun, 2010, at 20:31 , Bartosz Dziewoński wrote:

 2010/6/8, Raimon Fernandez co...@montx.com:
 In Reststop docs they say a good example is the blog.rb, but their link is 
 broken.
 
 Where I can find it ?
 
 It should come with the gem, in examples directory.

oughhh, you're right, it's there.

 You can also find it here: 
 http://github.com/camping/camping/blob/master/examples/blog.rb

thanks,

raimon

 
 -- 
 Matma Rex - http://matma-rex.prv.pl/
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

camping-oauth is now available

2010-06-07 Thread Philippe Monnet
I finally put together the final touches on the first version of the 
camping-oauth gem.
It allows you to make a Camping web app into an OAuth provider. It 
leverages ruby-oauth and the oauth-plugin.
An example of a use case is a web service built with Camping (using 
json/xml with/without REST).


You can find it on GitHub: http://bit.ly/campingoauth
I also wrote a blog post on how to use it (and a little about OAuth as 
well as how I approached the plugin): http://bit.ly/caoapost


Let me know if you have any questions or if you encounter any issues.

Philippe
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

filtering_camping is now available as a gem

2010-05-31 Thread Philippe Monnet
To make it easy for people to use the CampingFilters module available on 
GitHub (http://github.com/judofyr/filtering_camping), I have created and 
published a corresponding gem with Magnus' approval. You can find it at: 
http://rubygems.org/gems/filtering_camping 
http://rubygems.org/gems/filtering_camping


Btw Magnus and I are discussing the option to bundle the module in 
Camping in the future.


Happy [controller] filtering!

- Philippe (@techarch)
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping on Ruby 1.9.1 on Win32

2010-05-20 Thread Magnus Holm
Hey Dave,

Yeah, Camping should work on both 1.9.1 and Windows, but I haven't
tested it in a while. Try it out, and please let us know if there's
something that doesn't work :)

// Magnus Holm



On Thu, May 20, 2010 at 02:47, David Ray djr@gmail.com wrote:
 Hi all,

 Can I go camping with ruby 1.9.1 on win32?

 Many thanks,
 Dave.

 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Camping on Ruby 1.9.1 on Win32

2010-05-19 Thread David Ray

Hi all,

Can I go camping with ruby 1.9.1 on win32?

Many thanks,
Dave.

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Published a blog post on how to use MongoDB with Camping

2010-05-13 Thread Philippe Monnet
If you are interested in trying out MongoDB from a Camping perspective: 
http://bit.ly/a8jdzq

I am curious about other folks using MongoDB too.

- Philippe (@techarch)
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Proposal for optional compilation and caching of Tilt templates

2010-05-09 Thread Philippe Monnet

I just made the changes and merged up to the main Camping branch:
I am now setting the new :dynamic_templates option when you run the 
camping server (only).


Magnus I did not rebuild the official gem yet. Maybe you could do that.

On 5/8/2010 6:03 PM, Magnus Holm wrote:


Thanks for testing it out ;)

I agree: we can't cache templates in development and you shouldn't 
need to set an option for that, however we also want Camping to be 
speedy out-of-box.


What about applying your patch, but also make bin/camping set 
:dynamic_templates to true if it's not set already?


If you want to force caching (or force not-caching) in your app, you 
simply set :dynamic_templates, true/false. And if you don't, it 
compiles if you i.e. run it through a configuration.ru 
http://configuration.ru, but is dynamic with bin/camping. Best of 
both worlds?


On May 9, 2010 12:43 AM, Philippe Monnet r...@monnet-usa.com 
mailto:r...@monnet-usa.com wrote:


I gave Magnus' excellent integration of Tilt a whirl today and really 
love it.
It's also cool because you can match different types of templates at 
the same time (e.g. Markaby + HAML).


I found that while prototyping it would be nice to not have Camping 
compile and cache Tilt templates.
So I used the new option capability and defined a :dynamic_templates 
option.


e.g.:

module TiltTest
set :views, File.dirname(__FILE__) + '/views'
set :dynamic_templates, true

#...
end

I changed the Camping code to check for that option and only compile 
and cache if false.

What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork: 
http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764


Magnus, you might have some additional ideas for tweaking this 
feature. So feel free to add/alter and merge to your liking.


Philippe

___
Camping-list mailing list
Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Proposal for optional compilation and caching of Tilt templates

2010-05-08 Thread Philippe Monnet
I gave Magnus' excellent integration of Tilt a whirl today and really 
love it.
It's also cool because you can match different types of templates at the 
same time (e.g. Markaby + HAML).


I found that while prototyping it would be nice to not have Camping 
compile and cache Tilt templates.

So I used the new option capability and defined a :dynamic_templates option.

e.g.:

module TiltTest
set :views, File.dirname(__FILE__) + '/views'
set :dynamic_templates, true

#...
end

I changed the Camping code to check for that option and only compile and 
cache if false.

What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork: 
http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764


Magnus, you might have some additional ideas for tweaking this feature. 
So feel free to add/alter and merge to your liking.


Philippe
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Changing render semantics?

2010-05-01 Thread Philippe Monnet
Got a chance today to verify all my apps and I am not using the multiple 
argument for of render.

So go for it Magnus! :-)

On 4/24/2010 4:39 PM, Magnus Holm wrote:

I'm trying to integrate Tilt (for providing Haml etc. support), but
are having some problems supporting both the previous `render` and
this new `render`.

Previous render:
- loads Markaby when needed
- Always wraps the layout
- render :index  # =  Calls index() within Markaby
- render :index, 1, 2 # =  Calls index(1, 2) within Markaby

What I want from the new render:
- loads Markaby when needed
- loads Tilt when needed
- render :index, :layout =  false # =  Don't wraps the layout
- render :foo # =  Will check #{VIEW_PATH}/foo.* and render that file
(falling back on the Markaby methid)
- render :foo, :locals =  { :bar =  123 } # =  Same as above, but with
local variables set
- render :index, :locals =  { :foo =  123 } # =  :locals is ignored if
it's a Markaby method

I guess the question is: Does anybody actually use `render` with
multiple arguments (render :index, 1, 2)? If not, I guess we can
easily switch to this new `render` without breaking code.

// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Aprilfest

2010-04-29 Thread Magnus Holm
http://github.com/camping/camping/compare/4539baf...6347baf

Latest changes in Camping:
1. There is now a Camping.options
2. Session now uses the Camping.options above
3. Fast Tilt integration (ERB/Haml support!)
4. Various changes

gem install camping --source http://gems.judofyr.net/

Any comments or improvements? Have I done anything stupid?

I think I'll rather go for the
commit-to-master-and-revert-if-theres-something-wrong, than the
commit-to-branch-or-fork-and-merge-when-ready.

--

1. There is now a Camping.options

Useful (mostly for plugins) when you need to set different options:

  module App
set :hello, foo
  end

  App.options[:hello] == foo

--

2. Session now uses the Camping.options above

I want every setting to use Camping.options, so here's the new way:

  module App
set :secret, KEEP IT SECRET
include Camping::Session
  end

--

3. Fast Tilt integration

  module App
set :views, File.dirname(__FILE__) + '/views'

module Controllers
  class Index
def get
  render :index
end
  end
end
  end

If you now create a file called views/index.haml, `render` will now
render that file (instead of looking for a Markaby method). You can
also create views/layout.haml and it will wrap it (`yield` will return
the inner template). You can of course also use views/index.erb or any
other template engine which Tilt supports (see
http://github.com/rtomayko/tilt)

--

4. Various changes

* require 'camping-unabridged' now marks itself as 'camping' was
required, and nothing happesn if you do require 'camping' later (great
for development!)

* Camping::Server now uses Rack::Server is a lot more cleaner.

* The session is now stored as a Hash, and not a App::H. This caused
me some weird bugs.

* Use Class#method_defined? instead of Class#instance_method rescue nil

* Fix bug in rake diff



// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Changing render semantics?

2010-04-25 Thread John Beppu
On Sat, Apr 24, 2010 at 3:39 PM, Magnus Holm judo...@gmail.com wrote:


 I guess the question is: Does anybody actually use `render` with
 multiple arguments (render :index, 1, 2)? If not, I guess we can
 easily switch to this new `render` without breaking code.



I do not use the multi-argument form of render.  I didn't even know you
could do that.

--beppu
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Changing render semantics?

2010-04-24 Thread Magnus Holm
I'm trying to integrate Tilt (for providing Haml etc. support), but
are having some problems supporting both the previous `render` and
this new `render`.

Previous render:
- loads Markaby when needed
- Always wraps the layout
- render :index  # = Calls index() within Markaby
- render :index, 1, 2 # = Calls index(1, 2) within Markaby

What I want from the new render:
- loads Markaby when needed
- loads Tilt when needed
- render :index, :layout = false # = Don't wraps the layout
- render :foo # = Will check #{VIEW_PATH}/foo.* and render that file
(falling back on the Markaby methid)
- render :foo, :locals = { :bar = 123 } # = Same as above, but with
local variables set
- render :index, :locals = { :foo = 123 } # = :locals is ignored if
it's a Markaby method

I guess the question is: Does anybody actually use `render` with
multiple arguments (render :index, 1, 2)? If not, I guess we can
easily switch to this new `render` without breaking code.

// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Try Camping!

2010-04-22 Thread Magnus Holm
Here's my proposal for Ruby Summer of Code:
http://github.com/judofyr/try-camping

// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Should we incorporate a filtering mechanism in controllers?

2010-04-19 Thread Dave Everitt
Philippe - dead simple for me. I was put off Rails a long time ago,  
which is how I landed on Camping - Dave Everitt


Do people prefer something simple dead easy like filtering_camping?  
Or would people prefer something more like filters in Rails?


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Should we incorporate a filtering mechanism in controllers?

2010-04-18 Thread Philippe Monnet
Last year I discovered filtering_camping 
http://github.com/judofyr/filtering_camping and I have been using it 
in my apps. As I am working on a OAuth Camping plugin (adapted from the 
OAuth Rails plugin), I was thinking of using filtering_camping. And that 
lead to the following questions?


  1. Are people using filtering_camping?
  2. Are people using other types of before/after filter framework?
  3. Should we incorporate this capability in the base?
  4. Do people prefer something simple dead easy like
 filtering_camping? Or would people prefer something more like
 filters in Rails?

Philippe
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.1: Tests

2010-04-13 Thread Magnus Holm
Mosquito tests the app from within the same process. I think it'd make
more sense to have the tests run over HTTP.

// Magnus Holm



On Tue, Apr 13, 2010 at 02:00, Philippe Monnet r...@monnet-usa.com wrote:
 Did not know about WebRat but it seems pretty compelling. I had meant to
 look at Mosquito (http://mosquito.rubyforge.org/) but if WebRat has a
 greater adoption in the Ruby community that might make more sense.

 On 4/12/2010 8:18 AM, Magnus Holm wrote:

 Wanted to highlight some of the issues we know have on github and get
 some discussion going.

 First up: Tests - http://github.com/camping/camping/issues#issue/15

 Currently Camping doesn't have any automated tests. At all. Now, I'm
 not a testing freak, but I'm not _why either, so I believe we'll have
 to have *some* tests. I'm not talking about 100% unit-test coverage,
 but just something which lets us commit with confidence and makes it
 easier to make sure everything works on both 1.8 and 1.9.

 One idea I had: Use what we have in test/apps/ now and write
 WebRat-steps to make sure everything works as expected. The apps
 should be ran through Camping::Server, and the tests should use
 Net::HTTP so we test the whole stack.

 Anyone wants to give it a try, or have any other ideas?


 // Magnus Holm
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Camping 2.1: Tests

2010-04-12 Thread Magnus Holm
Wanted to highlight some of the issues we know have on github and get
some discussion going.

First up: Tests - http://github.com/camping/camping/issues#issue/15

Currently Camping doesn't have any automated tests. At all. Now, I'm
not a testing freak, but I'm not _why either, so I believe we'll have
to have *some* tests. I'm not talking about 100% unit-test coverage,
but just something which lets us commit with confidence and makes it
easier to make sure everything works on both 1.8 and 1.9.

One idea I had: Use what we have in test/apps/ now and write
WebRat-steps to make sure everything works as expected. The apps
should be ran through Camping::Server, and the tests should use
Net::HTTP so we test the whole stack.

Anyone wants to give it a try, or have any other ideas?


// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Camping 2.1: Rackification

2010-04-12 Thread Magnus Holm
Rackification - http://github.com/camping/camping/issues#issue/3

I want to make Camping even more Rack-ish. Some ideas:

1. Make Camping::Server use Rack::Server

2. The dispatcher shouldn't care about the method

Previously the dispatcher (Controllers.D) has taken a path and a
method, and returns an array with the controller and the method:

D(/, get) # = [Index, 'get']
D(/, post) # = [I, 'r501']  # no post-method in Index
D(/not_found, get) # = [I, 'r404']

I want to make it such that the dispatcher only cares about the path,
and then the controllers are responsible for calling the right method.
I feel that is more HTTP-ish: First look up the resource, then try to
call the method.

3. When the method isn't found, call #method_missing

Okay, this one is kinda dangerous, but it would be cool if Camping
would call #method_missing if the method doesn't exist. That way,
Camping almost becomes the Ruby-version of HTTP. Too dangerous (aka.
it would swallow regular NoMethorError) or possible?


// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Camping 2.1: Easier to extend

2010-04-12 Thread Magnus Holm
http://github.com/camping/camping/issues#issue/10

It's currently very hard to extend Camping, so I've been thinking of
ways to make it easier without taking too many bytes.

Here's a very simple approach: https://gist.github.com/75ecb81a3ae98b097f8a

When you write `Camping.plugin :Foo` it stores the code in the file,
and when you later call `App.needs :Foo` it fetches the file again and
replaces Camping with App. Not perfect, but at least it's something.
I'll have to try to get RESTstop using this technique to see how it
works...

Any other ideas? Comments?


// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Camping 2.1: Making migrations less sucky

2010-04-12 Thread Magnus Holm
http://github.com/camping/camping/issues#issue/12

This is probably the most exciting issue: Making migrations less sucky.

The fact that you'll have to do this to get started sucks:

module Nuts::Models
  class Page  Base
  end

  class BasicFields  V 1.0
def self.up
  create_table Page.table_name do |t|
t.string :title
t.text   :content
# This gives us created_at and updated_at
t.timestamps
  end
end

def self.down
  drop_table Page.table_name
end
  end
end

It should really just be something like this:

module Nuts::Models
  class Page  Base
t.string :title
t.text  :content
t.timestamps
  end
end

But we still want to support regular migrations (in some way at
least). See the issue for more examples/comments.

// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping 2.1: Rackification

2010-04-12 Thread Philippe Monnet

#1 seems to make sense. I personally tend to use rackup anyway.
#2 seems ok.
#3 agreed with the dangerous override - how about http_method_missing 
instead?


On 4/12/2010 8:32 AM, Magnus Holm wrote:

Rackification - http://github.com/camping/camping/issues#issue/3

I want to make Camping even more Rack-ish. Some ideas:

1. Make Camping::Server use Rack::Server

2. The dispatcher shouldn't care about the method

Previously the dispatcher (Controllers.D) has taken a path and a
method, and returns an array with the controller and the method:

D(/, get) # =  [Index, 'get']
D(/, post) # =  [I, 'r501']  # no post-method in Index
D(/not_found, get) # =  [I, 'r404']

I want to make it such that the dispatcher only cares about the path,
and then the controllers are responsible for calling the right method.
I feel that is more HTTP-ish: First look up the resource, then try to
call the method.

3. When the method isn't found, call #method_missing

Okay, this one is kinda dangerous, but it would be cool if Camping
would call #method_missing if the method doesn't exist. That way,
Camping almost becomes the Ruby-version of HTTP. Too dangerous (aka.
it would swallow regular NoMethorError) or possible?


// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.1: Tilt integration

2010-04-12 Thread Philippe Monnet
Tilt seems pretty cool based on quick glance at the site. This would 
give people a few more well-known options.


On 4/12/2010 8:37 AM, Magnus Holm wrote:

Tilt - http://github.com/camping/camping/issues#issue/18

Tilt integration (http://github.com/rtomayko/tilt) is a dead-simple
way to support ERB, Erubis, Haml, Liquid, Builder and other template
engines. It would be nice if require 'camping/templates' would
re-define Base#render to use Tilt IMO.

// Magnus Holm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: [ANN] Camping 2.0 - miniature rails for stay-at-home moms AND dads :-)

2010-04-09 Thread Philippe Monnet

Yippee! [cling cheers cling skål* *cling santé cling]
Thanks Magnus for all the hard work bringing Camping to 2.0.
_why must be proud!

Philippe

On 4/9/2010 8:47 AM, Magnus Holm wrote:

require uri;require rack;class Object;def meta_def m,b;(classself;self
end).send:define_method,m,b end end;module Camping;C=self;S=IO.read(__FILE__
)rescue nil;P=h1Cam\ping Problem!/h1h2%s/h2;U=Rack::Utils;Apps=[]
class HHash;def method_missing m,*a;m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m.
to_s]:super end;undef id,type if ??==63;end;module Helpers;def R c,*g;p,h=
/\(.+?\)/,g.grep(Hash);g-=h;raisebad routeunless u=c.urls.find{|x|break x if
x.scan(p).size==g.size/^#{x}\/?$/=~(x=g.inject(x){|x,a|x.sub p,U.escape((a[
a.class.primary_key]rescue a))})};h.any?? u+?+U.build_query(h[0]):u end;def
/ p;p[0]==?/?...@root + p : p end;def URL c='/',*a;c=R(c, *a) if c.respond_to?(
:urls);c=self/c;c...@request.url[/.{8,}?(?=\/)/]+c if c[0]==?/;URI c end end
module Base;attr_accessor:env,:request,:root,:input,:cookies,:state,:status,
:headers,:body;def render v,*a,b;mab(/^_/!~v.to_s){send(v,*a,b)} end;def
mab l=nil,b;m=Mab.new({},self);s=m.capture(b);s=m.capture{layout{s}} if l
m.respond_to?(:layout);s end;def r s,b,h={};b,h=h,b if Hash===b;@status=s;
@headers.merge!(h);@body=b;end;def redirect *a;r 302,'','Location'=URL(*a).
to_s;end;def r404 p;P%#{p} not foundend;def r500 k,m,e;raise e;end;def r501 m
P%#{m.upcase} not implementedend;def 
to_a;@env['rack.session']...@state;r=Rack::
Response.new(@body,@status,@headers);@cookies.each{|k,v|next if @old_cookies[
k]==v;v={:value=v,:path=self//} if String===v;r.set_cookie(k,v)};r.to_a;end
def initialize(env,m) r...@request=rack::Request.new(@env=env);@root,@input,
@cookies,@state,@headers,@status,@method=r.script_name.sub(/\/$/,''),n(r.params
),h...@old_cookies = r.cookies],H[r.session],{},m=~/r(\d+)/?$1.to_i: 200,m 
end;def
n h;Hash===h ?h.inject(H[]){|m,(k,v)|m[k]=n(v);m}: h end;def service *a;r=catch(
:halt){send(@method,*a)};@body||=r;self;end;end;module Controllers;@r=[];class
self;def r;@r end;def R 
*u;r...@r;Class.new{meta_def(:urls){u};meta_def(:inherited
){|x|rx}}end;def D p,m;p='/'if !p||!p[0];r.map{|k|k.urls.map{|x|return(k.
instance_method(m)rescue nil)?[k,m,*$~[1..-1]]:[I,'r501',m]if p=~/^#{x}\/?$/}}
[I,'r404',p] end;N=H.new{|_,x|x.downcase}.merge! N='(\d+)',X='([^/]+)',
Index='';def M;def M;end;constants.map{|c|k=const_get(c);k.send:include,C,
Base,Helpers,Models;@r=[k]+r if r-[k]==r;k.meta_def(:urls){ [ /#{c.scan(
/.[^A-Z]*/).map(N.method(:[]))*'/'}]}if !k.respond_to?:urls}end end;I=R()
end;X=Controllers;classself;def goes m;Appseval(S.gsub(/Camping/,m.to_s),
TOPLEVEL_BINDING) end;def call e;X.M;p=e['PATH_INFO']=U.unescape(e['PATH_INFO'])
k,m,*a=X.D p,e['REQUEST_METHOD'].downcase;k.new(e,m).service(*a).to_a;rescue
r500(:I,k,m,$!,:env=e).to_a;end;def method_missing m,c,*a;X.M;h=Hash===a[-1]?
a.pop: {};e=H[Rack::MockRequest.env_for('',h.delete(:env)||{})];k=X.const_get(c
).new(e,m.to_s);h.each{|i,v|k.send#{i}=,v};k.service(*a);end;def use*a,b;m=a.
shift.new(method(:call),*a,b);meta_def(:call){|e|m.call(e)}end end;module Views
include X,Helpers end;module Models;autoload:Base,
'camping/ar';end;autoload:Mab,'camping/mab';C end

---

Wow. After 199 commits, 11875 lines of diff and 1284 days, it's an honor to
present a new, freshly baked version of the microframework; now built upon
Rack and weighing only 3072 tiny bytes.  (That's exactly 3k!)

 gem install camping

Home: http://whywentcamping.com/  (currently only redirects to the docs)
Docs: http://camping.rubyforge.org/
Code/wiki/bugs: http://github.com/camping/camping
Mailing list: http://rubyforge.org/mailman/listinfo/camping-list

~  Wait a second, you're not _why!

Well, no. He went camping, so we decided to commandeer and steer this ship
back on course. I'm merely a scoutmaster; it's the community who's in charge.
Want to have an impact on Camping? Just join the mailing list, and your voice
will be heard.

~  What's new?

Let's start with Rack.

Every Camping app is now a Rack app.  This is your config.ru:

 require 'blog'
 run Blog

If your app requires a middleware, you can inject it inside your app:

 module Blog
   use Rack::MethodOverride
 end

Sessions are now simply a wrapper around env['rack.session'], so it's easy as
pie to `use Other::SessionBackends`.

Ironicly, the methods Rack stole from Camping are no longer in Camping, since
it's shorter to simply call those in Rack :-)

Next up: The book - http://camping.rubyforge.org/book.html

Not really a book, but it should get you started with Camping pretty quick. It's
far from complete, but in the end you should know plenty about both Camping,
Rack, HTTP and other frameworks. Web development is a huge field in Ruby and can
be a little confusing for newcomers. This book should give you a gentle
introduction together with pointers to where you could go for more.

This book isn't written yet. Let me repeat that: This book isn't
written yet. Nothing 

Re: [ANN] Camping 2.0 - minature rails for stay-at-home moms

2010-04-09 Thread John Beppu
Good job.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: [ANN] Camping 2.0 - minature rails for stay-at-home moms

2010-04-09 Thread David Susco
Indeed, congratulations everyone. And thank you to all those who made
the 199 commits.

On Fri, Apr 9, 2010 at 12:14 PM, John Beppu john.be...@gmail.com wrote:
 Good job.

 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping 2.0.RC0

2010-04-08 Thread Matt Zukowski
Okay everything's been moved to camping/reststop. Any future commits on my
part will go there. Philippe, I believe you have access too.

Thanks Magnus!

On Wed, Apr 7, 2010 at 6:57 PM, Matt Zukowski m...@roughest.net wrote:

 Magnus, create a new one and I'll delete my copy and fork off yours.


 On Wed, Apr 7, 2010 at 5:05 PM, Magnus Holm judo...@gmail.com wrote:

 Oh, I totally forgot about that!

 Yes, I agree that this would be nice to have at github.com/camping.
 Should I fork Matt's repo or create a new one?


 // Magnus Holm



 On Wed, Apr 7, 2010 at 19:18, Matt Zukowski m...@roughest.net wrote:
  Hey Philippe, thanks for that. I've gone ahead and created a github repo
 for
  reststop at https://github.com/zuk/reststop
  Your changes have been pushed up. I've also added you as a collaborator
 so
  you can freely commit to my copy of the repo.
  Next step is to create a gemspec for this and push it up to
  gemcutter/rubyforge.
  Matt.
 
  On Wed, Apr 7, 2010 at 9:02 AM, Philippe Monnet r...@monnet-usa.com
 wrote:
 
  Successfully tested the updated RESTstop restful blog too.
  Started to test my own app (mySkillsMap.com) locally but will need to
  continue tonight.
 
  On 4/7/2010 5:33 AM, Philippe Monnet wrote:
 
  I tested 2 new apps I wrote to test OAuth so far with success.
  I sill have to test my main web app and the recent RESTstop blog app I
 had
  updated.
 
  On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm judo...@gmail.com wrote:
 
 
   Ladies and gentlemen:
   gem install camping --prerelease
   (Look, no --source!)
   I'm not a big fan of betas/RCs, but this is a rather big change and I
   want
   to make sure we release something that actually works. I don't have
 any
   apps
   that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if
 some
   of
   you could verify that it works as expected?
   I'll give it a week or so, and if everything seems fine I'll…
   * Copy the documentation at http://stuff.judofyr.net/camping-docs/
  to
   http://camping.rubyforge.org/
   * Make sure all the links in the wiki points to the right place
   * Release the gem as 2.0 at rubygems.org
   * Write an announcement which I'll post to ruby-core, rack-devel and
   camping-list
   * Submit the announcement to Rubyflow and ruby.reddit
   * Write a patch which removes Rack::Adapters::Camping from Rack
   * (Possibly write a little blog post comparing Camping and Sinatra
 from
   an
   objective point of view)
   * Start hacking on Camping 2.1!
   Puh. What'd ya think?
   Oh, and busbey has been playing a bit with the
   code: http://github.com/busbey/camping. Some awesome migrations
 ideas in
   there. Looking forward to merge them into 2.1!
  
   // Magnus Holm
  
   ___
   Camping-list mailing list
   Camping-list@rubyforge.org
   http://rubyforge.org/mailman/listinfo/camping-list
  
 
 
 
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-08 Thread Philippe Monnet
I just finished spot-testing my main web app (mySkillsMap) locally on 
2.0 and things are looking good.

So it sounds like we're going to be a go for 2.0! :-)

On 4/7/2010 7:02 AM, Philippe Monnet wrote:

Successfully tested the updated RESTstop restful blog too.
Started to test my own app (mySkillsMap.com) locally but will need to 
continue tonight.


On 4/7/2010 5:33 AM, Philippe Monnet wrote:

I tested 2 new apps I wrote to test OAuth so far with success.
I sill have to test my main web app and the recent RESTstop blog app 
I had updated.


On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holmjudo...@gmail.com  wrote:
   

  Ladies and gentlemen:
   gem install camping --prerelease
  (Look, no --source!)
  I'm not a big fan of betas/RCs, but this is a rather big change and I want
  to make sure we release something that actually works. I don't have any apps
  that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some of
  you could verify that it works as expected?
  I'll give it a week or so, and if everything seems fine I'll...
  * Copy the documentation athttp://stuff.judofyr.net/camping-docs/  to
  http://camping.rubyforge.org/
  * Make sure all the links in the wiki points to the right place
  * Release the gem as 2.0 at rubygems.org
  * Write an announcement which I'll post to ruby-core, rack-devel and
  camping-list
  * Submit the announcement to Rubyflow and ruby.reddit
  * Write a patch which removes Rack::Adapters::Camping from Rack
  * (Possibly write a little blog post comparing Camping and Sinatra from an
  objective point of view)
  * Start hacking on Camping 2.1!
  Puh. What'd ya think?
  Oh, and busbey has been playing a bit with the
  code:http://github.com/busbey/camping. Some awesome migrations ideas in
  there. Looking forward to merge them into 2.1!

  // Magnus Holm

  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list

   
   



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list




___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Mikkel Refsgaard Bech
Changed:
@env.REQUEST_URI
to
@env['REQUEST_URI']
then all tests worked on my app.

On Sat, Apr 3, 2010 at 10:23 PM, Magnus Holm judo...@gmail.com wrote:

 Ladies and gentlemen:

 gem install camping --prerelease

 (Look, no --source!)

 I'm not a big fan of betas/RCs, but this is a rather big change and I want
 to make sure we release something that actually works. I don't have any apps
 that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some of
 you could verify that it works as expected?

 I'll give it a week or so, and if everything seems fine I'll…

 * Copy the documentation at http://stuff.judofyr.net/camping-docs/ to
 http://camping.rubyforge.org/
 * Make sure all the links in the wiki points to the right place
 * Release the gem as 2.0 at rubygems.org
 * Write an announcement which I'll post to ruby-core, rack-devel and
 camping-list
 * Submit the announcement to Rubyflow and ruby.reddit
 * Write a patch which removes Rack::Adapters::Camping from Rack
 * (Possibly write a little blog post comparing Camping and Sinatra from an
 objective point of view)
 * Start hacking on Camping 2.1!

 Puh. What'd ya think?

 Oh, and busbey has been playing a bit with the code:
 http://github.com/busbey/camping. Some awesome migrations ideas in there.
 Looking forward to merge them into 2.1!


 // Magnus Holm

 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Philippe Monnet

I tested 2 new apps I wrote to test OAuth so far with success.
I sill have to test my main web app and the recent RESTstop blog app I 
had updated.


On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holmjudo...@gmail.com  wrote:


  Ladies and gentlemen:
   gem install camping --prerelease
  (Look, no --source!)
  I'm not a big fan of betas/RCs, but this is a rather big change and I want
  to make sure we release something that actually works. I don't have any apps
  that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some of
  you could verify that it works as expected?
  I'll give it a week or so, and if everything seems fine I'll...
  * Copy the documentation athttp://stuff.judofyr.net/camping-docs/  to
  http://camping.rubyforge.org/
  * Make sure all the links in the wiki points to the right place
  * Release the gem as 2.0 at rubygems.org
  * Write an announcement which I'll post to ruby-core, rack-devel and
  camping-list
  * Submit the announcement to Rubyflow and ruby.reddit
  * Write a patch which removes Rack::Adapters::Camping from Rack
  * (Possibly write a little blog post comparing Camping and Sinatra from an
  objective point of view)
  * Start hacking on Camping 2.1!
  Puh. What'd ya think?
  Oh, and busbey has been playing a bit with the
  code:http://github.com/busbey/camping. Some awesome migrations ideas in
  there. Looking forward to merge them into 2.1!

  // Magnus Holm

  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list

   



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Philippe Monnet

Successfully tested the updated RESTstop restful blog too.
Started to test my own app (mySkillsMap.com) locally but will need to 
continue tonight.


On 4/7/2010 5:33 AM, Philippe Monnet wrote:

I tested 2 new apps I wrote to test OAuth so far with success.
I sill have to test my main web app and the recent RESTstop blog app I 
had updated.


On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holmjudo...@gmail.com  wrote:
   

  Ladies and gentlemen:
   gem install camping --prerelease
  (Look, no --source!)
  I'm not a big fan of betas/RCs, but this is a rather big change and I want
  to make sure we release something that actually works. I don't have any apps
  that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some of
  you could verify that it works as expected?
  I'll give it a week or so, and if everything seems fine I'll...
  * Copy the documentation athttp://stuff.judofyr.net/camping-docs/  to
  http://camping.rubyforge.org/
  * Make sure all the links in the wiki points to the right place
  * Release the gem as 2.0 at rubygems.org
  * Write an announcement which I'll post to ruby-core, rack-devel and
  camping-list
  * Submit the announcement to Rubyflow and ruby.reddit
  * Write a patch which removes Rack::Adapters::Camping from Rack
  * (Possibly write a little blog post comparing Camping and Sinatra from an
  objective point of view)
  * Start hacking on Camping 2.1!
  Puh. What'd ya think?
  Oh, and busbey has been playing a bit with the
  code:http://github.com/busbey/camping. Some awesome migrations ideas in
  there. Looking forward to merge them into 2.1!

  // Magnus Holm

  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list

   
   



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Matt Zukowski
Hey Philippe, thanks for that. I've gone ahead and created a github repo for
reststop at https://github.com/zuk/reststop

Your changes have been pushed up. I've also added you as a collaborator so
you can freely commit to my copy of the repo.

Next step is to create a gemspec for this and push it up to
gemcutter/rubyforge.

Matt.

On Wed, Apr 7, 2010 at 9:02 AM, Philippe Monnet r...@monnet-usa.com wrote:

  Successfully tested the updated RESTstop restful blog too.
 Started to test my own app (mySkillsMap.com) locally but will need to
 continue tonight.


 On 4/7/2010 5:33 AM, Philippe Monnet wrote:

 I tested 2 new apps I wrote to test OAuth so far with success.
 I sill have to test my main web app and the recent RESTstop blog app I had
 updated.

  On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm judo...@gmail.com 
 judo...@gmail.com wrote:


   Ladies and gentlemen: gem install camping --prerelease (Look, no 
 --source!) I'm not a big fan of betas/RCs, but this is a rather big change 
 and I want to make sure we release something that actually works. I don't 
 have any apps that runs on Camping (neither 1.5 nor 1.9/2.0), so I was 
 hoping if some of you could verify that it works as expected? I'll give it 
 a week or so, and if everything seems fine I'll… * Copy the documentation at 
 http://stuff.judofyr.net/camping-docs/ to http://camping.rubyforge.org/ * 
 Make sure all the links in the wiki points to the right place * Release the 
 gem as 2.0 at rubygems.org * Write an announcement which I'll post to 
 ruby-core, rack-devel and camping-list * Submit the announcement to 
 Rubyflow and ruby.reddit * Write a patch which removes 
 Rack::Adapters::Camping from Rack * (Possibly write a little blog post 
 comparing Camping and Sinatra from an objective point of view) * Start 
 hacking on Camping 2.1! Puh. What'd ya think? Oh, and busbey has been 
 playing a bit with the code: http://github.com/busbey/camping. Some awesome 
 migrations ideas in there. Looking forward to merge them into 2.1! // 
 Magnus Holm ___ Camping-list 
 mailing list Camping-list@rubyforge.org 
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing 
 listcamping-l...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Magnus Holm
Oh, I totally forgot about that!

Yes, I agree that this would be nice to have at github.com/camping.
Should I fork Matt's repo or create a new one?


// Magnus Holm



On Wed, Apr 7, 2010 at 19:18, Matt Zukowski m...@roughest.net wrote:
 Hey Philippe, thanks for that. I've gone ahead and created a github repo for
 reststop at https://github.com/zuk/reststop
 Your changes have been pushed up. I've also added you as a collaborator so
 you can freely commit to my copy of the repo.
 Next step is to create a gemspec for this and push it up to
 gemcutter/rubyforge.
 Matt.

 On Wed, Apr 7, 2010 at 9:02 AM, Philippe Monnet r...@monnet-usa.com wrote:

 Successfully tested the updated RESTstop restful blog too.
 Started to test my own app (mySkillsMap.com) locally but will need to
 continue tonight.

 On 4/7/2010 5:33 AM, Philippe Monnet wrote:

 I tested 2 new apps I wrote to test OAuth so far with success.
 I sill have to test my main web app and the recent RESTstop blog app I had
 updated.

 On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm judo...@gmail.com wrote:


  Ladies and gentlemen:
      gem install camping --prerelease
  (Look, no --source!)
  I'm not a big fan of betas/RCs, but this is a rather big change and I
  want
  to make sure we release something that actually works. I don't have any
  apps
  that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some
  of
  you could verify that it works as expected?
  I'll give it a week or so, and if everything seems fine I'll…
  * Copy the documentation at http://stuff.judofyr.net/camping-docs/ to
  http://camping.rubyforge.org/
  * Make sure all the links in the wiki points to the right place
  * Release the gem as 2.0 at rubygems.org
  * Write an announcement which I'll post to ruby-core, rack-devel and
  camping-list
  * Submit the announcement to Rubyflow and ruby.reddit
  * Write a patch which removes Rack::Adapters::Camping from Rack
  * (Possibly write a little blog post comparing Camping and Sinatra from
  an
  objective point of view)
  * Start hacking on Camping 2.1!
  Puh. What'd ya think?
  Oh, and busbey has been playing a bit with the
  code: http://github.com/busbey/camping. Some awesome migrations ideas in
  there. Looking forward to merge them into 2.1!
 
  // Magnus Holm
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 




 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list


 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Philippe Monnet

Up to the two of you.

On 4/7/2010 3:05 PM, Magnus Holm wrote:

Oh, I totally forgot about that!

Yes, I agree that this would be nice to have at github.com/camping.
Should I fork Matt's repo or create a new one?


// Magnus Holm



On Wed, Apr 7, 2010 at 19:18, Matt Zukowskim...@roughest.net  wrote:
   

Hey Philippe, thanks for that. I've gone ahead and created a github repo for
reststop at https://github.com/zuk/reststop
Your changes have been pushed up. I've also added you as a collaborator so
you can freely commit to my copy of the repo.
Next step is to create a gemspec for this and push it up to
gemcutter/rubyforge.
Matt.

On Wed, Apr 7, 2010 at 9:02 AM, Philippe Monnetr...@monnet-usa.com  wrote:
 

Successfully tested the updated RESTstop restful blog too.
Started to test my own app (mySkillsMap.com) locally but will need to
continue tonight.

On 4/7/2010 5:33 AM, Philippe Monnet wrote:

I tested 2 new apps I wrote to test OAuth so far with success.
I sill have to test my main web app and the recent RESTstop blog app I had
updated.

On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holmjudo...@gmail.com  wrote:


   

Ladies and gentlemen:
 gem install camping --prerelease
(Look, no --source!)
I'm not a big fan of betas/RCs, but this is a rather big change and I
want
to make sure we release something that actually works. I don't have any
apps
that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some
of
you could verify that it works as expected?
I'll give it a week or so, and if everything seems fine I'll…
* Copy the documentation at http://stuff.judofyr.net/camping-docs/ to
http://camping.rubyforge.org/
* Make sure all the links in the wiki points to the right place
* Release the gem as 2.0 at rubygems.org
* Write an announcement which I'll post to ruby-core, rack-devel and
camping-list
* Submit the announcement to Rubyflow and ruby.reddit
* Write a patch which removes Rack::Adapters::Camping from Rack
* (Possibly write a little blog post comparing Camping and Sinatra from
an
objective point of view)
* Start hacking on Camping 2.1!
Puh. What'd ya think?
Oh, and busbey has been playing a bit with the
code: http://github.com/busbey/camping. Some awesome migrations ideas in
there. Looking forward to merge them into 2.1!

// Magnus Holm

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

 




___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

 

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-07 Thread Matt Zukowski
Magnus, create a new one and I'll delete my copy and fork off yours.

On Wed, Apr 7, 2010 at 5:05 PM, Magnus Holm judo...@gmail.com wrote:

 Oh, I totally forgot about that!

 Yes, I agree that this would be nice to have at github.com/camping.
 Should I fork Matt's repo or create a new one?


 // Magnus Holm



 On Wed, Apr 7, 2010 at 19:18, Matt Zukowski m...@roughest.net wrote:
  Hey Philippe, thanks for that. I've gone ahead and created a github repo
 for
  reststop at https://github.com/zuk/reststop
  Your changes have been pushed up. I've also added you as a collaborator
 so
  you can freely commit to my copy of the repo.
  Next step is to create a gemspec for this and push it up to
  gemcutter/rubyforge.
  Matt.
 
  On Wed, Apr 7, 2010 at 9:02 AM, Philippe Monnet r...@monnet-usa.com
 wrote:
 
  Successfully tested the updated RESTstop restful blog too.
  Started to test my own app (mySkillsMap.com) locally but will need to
  continue tonight.
 
  On 4/7/2010 5:33 AM, Philippe Monnet wrote:
 
  I tested 2 new apps I wrote to test OAuth so far with success.
  I sill have to test my main web app and the recent RESTstop blog app I
 had
  updated.
 
  On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm judo...@gmail.com wrote:
 
 
   Ladies and gentlemen:
   gem install camping --prerelease
   (Look, no --source!)
   I'm not a big fan of betas/RCs, but this is a rather big change and I
   want
   to make sure we release something that actually works. I don't have
 any
   apps
   that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if
 some
   of
   you could verify that it works as expected?
   I'll give it a week or so, and if everything seems fine I'll…
   * Copy the documentation at http://stuff.judofyr.net/camping-docs/ to
   http://camping.rubyforge.org/
   * Make sure all the links in the wiki points to the right place
   * Release the gem as 2.0 at rubygems.org
   * Write an announcement which I'll post to ruby-core, rack-devel and
   camping-list
   * Submit the announcement to Rubyflow and ruby.reddit
   * Write a patch which removes Rack::Adapters::Camping from Rack
   * (Possibly write a little blog post comparing Camping and Sinatra
 from
   an
   objective point of view)
   * Start hacking on Camping 2.1!
   Puh. What'd ya think?
   Oh, and busbey has been playing a bit with the
   code: http://github.com/busbey/camping. Some awesome migrations ideas
 in
   there. Looking forward to merge them into 2.1!
  
   // Magnus Holm
  
   ___
   Camping-list mailing list
   Camping-list@rubyforge.org
   http://rubyforge.org/mailman/listinfo/camping-list
  
 
 
 
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
 
  ___
  Camping-list mailing list
  Camping-list@rubyforge.org
  http://rubyforge.org/mailman/listinfo/camping-list
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping 2.0.RC0

2010-04-05 Thread David Susco
No hiccups with my apps.

Dave

On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm judo...@gmail.com wrote:
 Ladies and gentlemen:
     gem install camping --prerelease
 (Look, no --source!)
 I'm not a big fan of betas/RCs, but this is a rather big change and I want
 to make sure we release something that actually works. I don't have any apps
 that runs on Camping (neither 1.5 nor 1.9/2.0), so I was hoping if some of
 you could verify that it works as expected?
 I'll give it a week or so, and if everything seems fine I'll…
 * Copy the documentation at http://stuff.judofyr.net/camping-docs/ to
 http://camping.rubyforge.org/
 * Make sure all the links in the wiki points to the right place
 * Release the gem as 2.0 at rubygems.org
 * Write an announcement which I'll post to ruby-core, rack-devel and
 camping-list
 * Submit the announcement to Rubyflow and ruby.reddit
 * Write a patch which removes Rack::Adapters::Camping from Rack
 * (Possibly write a little blog post comparing Camping and Sinatra from an
 objective point of view)
 * Start hacking on Camping 2.1!
 Puh. What'd ya think?
 Oh, and busbey has been playing a bit with the
 code: http://github.com/busbey/camping. Some awesome migrations ideas in
 there. Looking forward to merge them into 2.1!

 // Magnus Holm

 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: restful camping with reststop

2010-03-27 Thread Matt Zukowski
Nicely done!

Also glad you're using restr... seems like rest-client is getting all the
love nowdays.

I'm happy to start a full-fledged githup repo for reststop. Although maybe a
better place for it would be the general 'camping' github account?

Matt.

On Fri, Mar 26, 2010 at 11:42 PM, Philippe Monnet r...@monnet-usa.comwrote:

  Ok, after a few more code changes, I am now able to run through all
 browser-based scenarios and all *restr*-based scenarios.
 I have added a comment starting with *...@techarch* on all the lines I have
 changed.
 I have also updated *restr.rb* so that the cookie header can be exchanged
 back and forth.
 I created a *test.rb* with a few snippets to use in IRB using Restr.
 My gist is available at: http://gist.github.com/343058
 Feel free to pick and choose/rewrite/optimize as needed when merging into
 Reststop. ;-)

 Philippe (@techarch on Twitter)

 On 3/24/2010 9:37 PM, Philippe Monnet wrote:

 Matt,

 Thanks for the head start on the port to 2.0.
 I have started to finish it and am about 95% there.
 At this point I can run through all browser-based scenarios and have
 started some of the Restr-based scenarios. I am now trying to figure out how
 to do the authentication bit for the PUT scenarios.
 I hope to complete this by the end of the week-end.

 Philippe

 On 3/23/2010 1:49 PM, Matt Zukowski wrote:

 Alright I spent a few hours trying to see if I can make things work with
 2.0.

  I was able to make some progress (mostly thanks to Magnus' help!) but ran
 out of time before I could get things runnings.

  Here's the result:

  http://gist.github.com/341555

  I'm not sure when I will get a chance in the near future to play around
 with this again, but if someone wants to take it and run with it I'd be
 happy to help.

  Matt.

 On Tue, Mar 23, 2010 at 12:36 PM, Magnus Holm judo...@gmail.com wrote:

 code = %q{
 # This Ruby code will be called everytime Camping.goes is called.
 # And Camping is replaced with the app module, so you can do stuff like:
 def Camping.foo
   puts Hello World!
 end

  # You probably just want to do:
 module Camping
   include MyExtension
 end
 }

  # For Camping.goes
 Camping::S  code
 # For previus Camping.goes
 Camping::Apps.each { |app| app.module_eval(code.gsub(Camping, app.to_s))
 }

  As for qsp, it's replaced by Rack::Utils.parse_query. This creates a
 regular Hash though, so I've written a Base#n to convert it to Camping::H.

  # Before:
 hash = Camping.qsp(hoho=1)
 # Now: (inside an instance of a controller)
 hash = n(Rack::Utils.parse_query(hoho=1))


 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:23, Matt Zukowski m...@roughest.net wrote:

 Okay got it... but as I look at this a bit more, the ridiculous things I
 had to do to make Reststop work (for Camping 1.0) are all coming back to me.


  As I recall, the root of all evil was Camping#goes. I had to override
 it in order to inject the Reststop code into Camping. Camping#qsp was the
 second evil, and I see that it's now gone. I'm looking around now to see
 what you've done to replace it (I take it Rack took care of some of that).


 On Tue, Mar 23, 2010 at 12:05 PM, Magnus Holm judo...@gmail.com wrote:

 @env['REQUEST_METHOD'] is the HTTP method send by the client, @method is
 the method (in lowercase) Camping is going to run (r404 for 404 etc.)

 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:01, Matt Zukowski m...@roughest.net wrote:

 Hey Magnus, while we have your attention, in 2.0 how do I get access to
 e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
 as we speak...


 On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.comwrote:

 I find extending Camping apps to be quite easy, since it's all classes
 and modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

  Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.netwrote:

 I actually have a reststop app up and running fine with Camping 2.0
 (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that
 it's a version of 2.0 that I forked about this time last year, and 
 looking
 at the github graph, Magnus has committed a whole slew of changes since
 then. So whatever broke Reststop must have been committed in the last 10
 months or so.

  To be honest over the last year I've mostly switched form Camping
 to Sinatra (and lately to Node.js, which is really really cool by the 
 way).
 The problem with Camping, for me, is that trying to extend it is
 a nightmare. I learned this the hard way while writing Reststop and 
 Picnic.

  Anyway I have a bit of time right now, so since there seems to be
 some interest, I'll pull down the latest version of Camping and see if 
 I can
 make it work with Reststop. I should 

Re: What now?

2010-03-24 Thread Philippe Monnet
Having a new official release would be great especially since Sinatra 
published their 1.0 release yesterday. ;-)


The new Rubyforge page would be nice but wouldn't a more 
marketing-centric site help increase adoption?


On 3/23/2010 9:58 AM, Magnus Holm wrote:
Indeed, but for now I think http://stuff.judofyr.net/camping-docs/ 
(or, the URL would actually be camping.rubyforge.org 
http://camping.rubyforge.org when released) would be enough.


I think we're pretty much ready for a release. If you'd like, I could 
mark HEAD as 2.0.rc1 and push it out to Gemcutter. Then you guys who 
have 2.0 apps could do a gem install camping --pre and make sure 
everything works. If everything seems fine we can release it :)



// Magnus Holm


On Tue, Mar 23, 2010 at 04:16, Philippe Monnet r...@monnet-usa.com 
mailto:r...@monnet-usa.com wrote:


I like the idea of the site being built on Camping and combining
mini-apps and static content all integrated with jQuery for
example. I am currently running two Camping 2.0 apps on Heroku and
they work great. Hosting on Heroku would be also be convenient
because of the ability to add Git contributors and because of the
ease of deployment.


On 3/21/2010 3:58 PM, Dave Everitt wrote:

Hi Philippe

I am one of those Camping friends (although I've been too busy
with clients just lately to do much). Although I just posted
links to your Camping 'add-ons' to the wiki :-)

I agree about Sinatra - from curiosity I've even dabbled with it
myself (shame!), although it is nice that Camping still has a
small community feel. Perhaps some _why-type cartoons (along the
lines you suggest) might be the right way forward for a 'This is
Camping' website. Or just keep things clean and minimal.

As for content, that was covered in another post to the list some
time ago, as was a domain name. Magnus has the substance
(tutorial, examples, etc.) and a nice CSS style for the blog
example. Maybe start with a developed version of the Camping blog
on Heroku (free) so we can each add Camping-related posts to keep
things fresh?

It's just making enough time to put it all together... I'd be
happy to chip in, but what's the best way to build a whole site
that uses Camping - a collection of apps and generated static
pages? I once used Camping 1.5 (running as CGI) as an easy way to
make a simple multipage wireframe mockup, but...

Dave


I was wondering how we can help with next steps?
I keep seeing all the attention going to the Sinatra framework
(and Rails of course) and would love to help more with promoting
Camping. It would be great if one of our web designer / Camping
friend could help create a catchy visual for the site. How about
a night time view of a camp fire with a tent and maybe a small
projector with a big silver screen where we could display
rotating content / slides? Any other crazy concepts?

Philippe


___
Camping-list mailing list
Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list




___
Camping-list mailing list
Camping-list@rubyforge.org mailto:Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Matt Zukowski
I actually have a reststop app up and running fine with Camping 2.0 (check
out Taskr at http://github.com/zuk/taskr). Tthe catch is that it's a version
of 2.0 that I forked about this time last year, and looking at the github
graph, Magnus has committed a whole slew of changes since then. So whatever
broke Reststop must have been committed in the last 10 months or so.

To be honest over the last year I've mostly switched form Camping to Sinatra
(and lately to Node.js, which is really really cool by the way). The problem
with Camping, for me, is that trying to extend it is a nightmare. I learned
this the hard way while writing Reststop and Picnic.

Anyway I have a bit of time right now, so since there seems to be some
interest, I'll pull down the latest version of Camping and see if I can make
it work with Reststop. I should also move Reststop to github while I'm at
it.

On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet r...@monnet-usa.comwrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of the
 render method needs to be adjusted (not sure what a[0] should be replaced
 with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with a 401.
 I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Magnus Holm
I find extending Camping apps to be quite easy, since it's all classes and
modules, but I can understand that extending Camping itself can be
difficult/weird. That said, I think a lot can be solved by defining
#included and #extended. It would be great if you could tell us a bit
exactly the problems you faced. We still have 1k left.

Don't hurry, though. Let's get 2.0 out first.

// Magnus Holm


On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.net wrote:

 I actually have a reststop app up and running fine with Camping 2.0 (check
 out Taskr at http://github.com/zuk/taskr). Tthe catch is that it's a
 version of 2.0 that I forked about this time last year, and looking at the
 github graph, Magnus has committed a whole slew of changes since then. So
 whatever broke Reststop must have been committed in the last 10 months or
 so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the way). The
 problem with Camping, for me, is that trying to extend it is a nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be some
 interest, I'll pull down the latest version of Camping and see if I can make
 it work with Reststop. I should also move Reststop to github while I'm at
 it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet r...@monnet-usa.comwrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of the
 render method needs to be adjusted (not sure what a[0] should be replaced
 with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with a
 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: What now?

2010-03-23 Thread Magnus Holm
Indeed, but for now I think http://stuff.judofyr.net/camping-docs/ (or, the
URL would actually be camping.rubyforge.org when released) would be enough.

I think we're pretty much ready for a release. If you'd like, I could mark
HEAD as 2.0.rc1 and push it out to Gemcutter. Then you guys who have 2.0
apps could do a gem install camping --pre and make sure everything works.
If everything seems fine we can release it :)


// Magnus Holm


On Tue, Mar 23, 2010 at 04:16, Philippe Monnet r...@monnet-usa.com wrote:

  I like the idea of the site being built on Camping and combining
 mini-apps and static content all integrated with jQuery for example. I am
 currently running two Camping 2.0 apps on Heroku and they work great.
 Hosting on Heroku would be also be convenient because of the ability to add
 Git contributors and because of the ease of deployment.


 On 3/21/2010 3:58 PM, Dave Everitt wrote:

 Hi Philippe

 I am one of those Camping friends (although I've been too busy with clients
 just lately to do much). Although I just posted links to your Camping
 'add-ons' to the wiki :-)

 I agree about Sinatra - from curiosity I've even dabbled with it myself
 (shame!), although it is nice that Camping still has a small community feel.
 Perhaps some _why-type cartoons (along the lines you suggest) might be the
 right way forward for a 'This is Camping' website. Or just keep things clean
 and minimal.

 As for content, that was covered in another post to the list some time ago,
 as was a domain name. Magnus has the substance (tutorial, examples, etc.)
 and a nice CSS style for the blog example. Maybe start with a developed
 version of the Camping blog on Heroku (free) so we can each add
 Camping-related posts to keep things fresh?

 It's just making enough time to put it all together... I'd be happy to chip
 in, but what's the best way to build a whole site that uses Camping - a
 collection of apps and generated static pages? I once used Camping 1.5
 (running as CGI) as an easy way to make a simple multipage wireframe mockup,
 but...

 Dave

 I was wondering how we can help with next steps?
 I keep seeing all the attention going to the Sinatra framework (and Rails
 of course) and would love to help more with promoting Camping. It would be
 great if one of our web designer / Camping friend could help create a catchy
 visual for the site. How about a night time view of a camp fire with a tent
 and maybe a small projector with a big silver screen where we could display
 rotating content / slides? Any other crazy concepts?

 Philippe


 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Matt Zukowski
Hey Magnus, while we have your attention, in 2.0 how do I get access to
e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
as we speak...

On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.com wrote:

 I find extending Camping apps to be quite easy, since it's all classes and
 modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

 Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.net wrote:

 I actually have a reststop app up and running fine with Camping 2.0 (check
 out Taskr at http://github.com/zuk/taskr). Tthe catch is that it's a
 version of 2.0 that I forked about this time last year, and looking at the
 github graph, Magnus has committed a whole slew of changes since then. So
 whatever broke Reststop must have been committed in the last 10 months or
 so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the way). The
 problem with Camping, for me, is that trying to extend it is a nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be some
 interest, I'll pull down the latest version of Camping and see if I can make
 it work with Reststop. I should also move Reststop to github while I'm at
 it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet r...@monnet-usa.comwrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of the
 render method needs to be adjusted (not sure what a[0] should be replaced
 with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with a
 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Magnus Holm
@env['REQUEST_METHOD'] is the HTTP method send by the client, @method is the
method (in lowercase) Camping is going to run (r404 for 404 etc.)

// Magnus Holm


On Tue, Mar 23, 2010 at 17:01, Matt Zukowski m...@roughest.net wrote:

 Hey Magnus, while we have your attention, in 2.0 how do I get access to
 e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
 as we speak...


 On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.com wrote:

 I find extending Camping apps to be quite easy, since it's all classes and
 modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

 Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.net wrote:

 I actually have a reststop app up and running fine with Camping 2.0
 (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that
 it's a version of 2.0 that I forked about this time last year, and looking
 at the github graph, Magnus has committed a whole slew of changes since
 then. So whatever broke Reststop must have been committed in the last 10
 months or so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the way). The
 problem with Camping, for me, is that trying to extend it is a nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be some
 interest, I'll pull down the latest version of Camping and see if I can make
 it work with Reststop. I should also move Reststop to github while I'm at
 it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet 
 r...@monnet-usa.comwrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of the
 render method needs to be adjusted (not sure what a[0] should be replaced
 with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with a
 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Matt Zukowski
Okay got it... but as I look at this a bit more, the ridiculous things I had
to do to make Reststop work (for Camping 1.0) are all coming back to me.

As I recall, the root of all evil was Camping#goes. I had to override it in
order to inject the Reststop code into Camping. Camping#qsp was the second
evil, and I see that it's now gone. I'm looking around now to see what
you've done to replace it (I take it Rack took care of some of that).

On Tue, Mar 23, 2010 at 12:05 PM, Magnus Holm judo...@gmail.com wrote:

 @env['REQUEST_METHOD'] is the HTTP method send by the client, @method is
 the method (in lowercase) Camping is going to run (r404 for 404 etc.)

 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:01, Matt Zukowski m...@roughest.net wrote:

 Hey Magnus, while we have your attention, in 2.0 how do I get access to
 e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
 as we speak...


 On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.com wrote:

 I find extending Camping apps to be quite easy, since it's all classes
 and modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

 Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.net wrote:

 I actually have a reststop app up and running fine with Camping 2.0
 (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that
 it's a version of 2.0 that I forked about this time last year, and looking
 at the github graph, Magnus has committed a whole slew of changes since
 then. So whatever broke Reststop must have been committed in the last 10
 months or so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the way). 
 The
 problem with Camping, for me, is that trying to extend it is a nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be some
 interest, I'll pull down the latest version of Camping and see if I can 
 make
 it work with Reststop. I should also move Reststop to github while I'm at
 it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet 
 r...@monnet-usa.comwrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of the
 render method needs to be adjusted (not sure what a[0] should be replaced
 with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with a
 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-23 Thread Matt Zukowski
Alright I spent a few hours trying to see if I can make things work with
2.0.

I was able to make some progress (mostly thanks to Magnus' help!) but ran
out of time before I could get things runnings.

Here's the result:

http://gist.github.com/341555

I'm not sure when I will get a chance in the near future to play around with
this again, but if someone wants to take it and run with it I'd be happy to
help.

Matt.

On Tue, Mar 23, 2010 at 12:36 PM, Magnus Holm judo...@gmail.com wrote:

 code = %q{
 # This Ruby code will be called everytime Camping.goes is called.
 # And Camping is replaced with the app module, so you can do stuff like:
 def Camping.foo
   puts Hello World!
 end

 # You probably just want to do:
 module Camping
   include MyExtension
 end
 }

 # For Camping.goes
 Camping::S  code
 # For previus Camping.goes
 Camping::Apps.each { |app| app.module_eval(code.gsub(Camping, app.to_s))
 }

 As for qsp, it's replaced by Rack::Utils.parse_query. This creates a
 regular Hash though, so I've written a Base#n to convert it to Camping::H.

 # Before:
 hash = Camping.qsp(hoho=1)
 # Now: (inside an instance of a controller)
 hash = n(Rack::Utils.parse_query(hoho=1))


 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:23, Matt Zukowski m...@roughest.net wrote:

 Okay got it... but as I look at this a bit more, the ridiculous things I
 had to do to make Reststop work (for Camping 1.0) are all coming back to me.

 As I recall, the root of all evil was Camping#goes. I had to override it
 in order to inject the Reststop code into Camping. Camping#qsp was the
 second evil, and I see that it's now gone. I'm looking around now to see
 what you've done to replace it (I take it Rack took care of some of that).


 On Tue, Mar 23, 2010 at 12:05 PM, Magnus Holm judo...@gmail.com wrote:

 @env['REQUEST_METHOD'] is the HTTP method send by the client, @method is
 the method (in lowercase) Camping is going to run (r404 for 404 etc.)

 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:01, Matt Zukowski m...@roughest.net wrote:

 Hey Magnus, while we have your attention, in 2.0 how do I get access to
 e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
 as we speak...


 On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.comwrote:

 I find extending Camping apps to be quite easy, since it's all classes
 and modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

 Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.netwrote:

 I actually have a reststop app up and running fine with Camping 2.0
 (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that
 it's a version of 2.0 that I forked about this time last year, and 
 looking
 at the github graph, Magnus has committed a whole slew of changes since
 then. So whatever broke Reststop must have been committed in the last 10
 months or so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the way). 
 The
 problem with Camping, for me, is that trying to extend it is a 
 nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be some
 interest, I'll pull down the latest version of Camping and see if I can 
 make
 it work with Reststop. I should also move Reststop to github while I'm at
 it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet 
 r...@monnet-usa.com wrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of
 the render method needs to be adjusted (not sure what a[0] should be
 replaced with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with
 a 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone managed to get camping to work with reststop using 1.9.354?





 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 

Re: restful camping with reststop

2010-03-23 Thread Matt Zukowski
Sorry that link should be: http://gist.github.com/341555#file_reststop2.rb

On Tue, Mar 23, 2010 at 3:49 PM, Matt Zukowski m...@roughest.net wrote:

 Alright I spent a few hours trying to see if I can make things work with
 2.0.

 I was able to make some progress (mostly thanks to Magnus' help!) but ran
 out of time before I could get things runnings.

 Here's the result:

 http://gist.github.com/341555

 I'm not sure when I will get a chance in the near future to play around
 with this again, but if someone wants to take it and run with it I'd be
 happy to help.

 Matt.


 On Tue, Mar 23, 2010 at 12:36 PM, Magnus Holm judo...@gmail.com wrote:

 code = %q{
 # This Ruby code will be called everytime Camping.goes is called.
 # And Camping is replaced with the app module, so you can do stuff like:
 def Camping.foo
   puts Hello World!
 end

 # You probably just want to do:
 module Camping
   include MyExtension
 end
 }

 # For Camping.goes
 Camping::S  code
 # For previus Camping.goes
 Camping::Apps.each { |app| app.module_eval(code.gsub(Camping, app.to_s))
 }

 As for qsp, it's replaced by Rack::Utils.parse_query. This creates a
 regular Hash though, so I've written a Base#n to convert it to Camping::H.

 # Before:
 hash = Camping.qsp(hoho=1)
 # Now: (inside an instance of a controller)
 hash = n(Rack::Utils.parse_query(hoho=1))


 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:23, Matt Zukowski m...@roughest.net wrote:

 Okay got it... but as I look at this a bit more, the ridiculous things I
 had to do to make Reststop work (for Camping 1.0) are all coming back to me.

 As I recall, the root of all evil was Camping#goes. I had to override it
 in order to inject the Reststop code into Camping. Camping#qsp was the
 second evil, and I see that it's now gone. I'm looking around now to see
 what you've done to replace it (I take it Rack took care of some of that).


 On Tue, Mar 23, 2010 at 12:05 PM, Magnus Holm judo...@gmail.com wrote:

 @env['REQUEST_METHOD'] is the HTTP method send by the client, @method is
 the method (in lowercase) Camping is going to run (r404 for 404 etc.)

 // Magnus Holm



 On Tue, Mar 23, 2010 at 17:01, Matt Zukowski m...@roughest.net wrote:

 Hey Magnus, while we have your attention, in 2.0 how do I get access to
 e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out
 as we speak...


 On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm judo...@gmail.comwrote:

 I find extending Camping apps to be quite easy, since it's all classes
 and modules, but I can understand that extending Camping itself can be
 difficult/weird. That said, I think a lot can be solved by defining
 #included and #extended. It would be great if you could tell us a bit
 exactly the problems you faced. We still have 1k left.

 Don't hurry, though. Let's get 2.0 out first.

 // Magnus Holm



 On Tue, Mar 23, 2010 at 16:07, Matt Zukowski m...@roughest.netwrote:

 I actually have a reststop app up and running fine with Camping 2.0
 (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that
 it's a version of 2.0 that I forked about this time last year, and 
 looking
 at the github graph, Magnus has committed a whole slew of changes since
 then. So whatever broke Reststop must have been committed in the last 10
 months or so.

 To be honest over the last year I've mostly switched form Camping to
 Sinatra (and lately to Node.js, which is really really cool by the 
 way). The
 problem with Camping, for me, is that trying to extend it is a 
 nightmare. I
 learned this the hard way while writing Reststop and Picnic.

 Anyway I have a bit of time right now, so since there seems to be
 some interest, I'll pull down the latest version of Camping and see if 
 I can
 make it work with Reststop. I should also move Reststop to github while 
 I'm
 at it.

 On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet 
 r...@monnet-usa.com wrote:

  Hi David,

 I had played with RESTstop on the old Camping maybe six months ago.
 I have now started to take a look at what the issues are about.
 So far I have found a few things like:

 In reststop.rb:
   - the service method needs to retrieve the REQUEST_METHOD using
 @env['REQUEST_METHOD']
   -the condition on the if statement on the last m.capture line of
 the render method needs to be adjusted (not sure what a[0] should be
 replaced with. So far I have temporarily replaced the line by:
  s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

 In the blog.rb example
   - the version number for camping needs to be updated
   - require 'camping/db' should be removed since now obsolete
   - require 'markaby' needs to be added

 So far I can bring up the app in a browser, login, add a post.
 But if I use Restr I can only do a GET. The PUT currently fails with
 a 401. I will continue to try figuring it out over the next week or so.
 It would be great if the initial author could help us out.

 Philippe


 On 3/12/2010 8:04 AM, David Susco wrote:

 Has anyone 

Re: What now?

2010-03-22 Thread Philippe Monnet
I like the idea of the site being built on Camping and combining 
mini-apps and static content all integrated with jQuery for example. I 
am currently running two Camping 2.0 apps on Heroku and they work great. 
Hosting on Heroku would be also be convenient because of the ability to 
add Git contributors and because of the ease of deployment.



On 3/21/2010 3:58 PM, Dave Everitt wrote:

Hi Philippe

I am one of those Camping friends (although I've been too busy with 
clients just lately to do much). Although I just posted links to your 
Camping 'add-ons' to the wiki :-)


I agree about Sinatra - from curiosity I've even dabbled with it 
myself (shame!), although it is nice that Camping still has a small 
community feel. Perhaps some _why-type cartoons (along the lines you 
suggest) might be the right way forward for a 'This is Camping' 
website. Or just keep things clean and minimal.


As for content, that was covered in another post to the list some time 
ago, as was a domain name. Magnus has the substance (tutorial, 
examples, etc.) and a nice CSS style for the blog example. Maybe start 
with a developed version of the Camping blog on Heroku (free) so we 
can each add Camping-related posts to keep things fresh?


It's just making enough time to put it all together... I'd be happy to 
chip in, but what's the best way to build a whole site that uses 
Camping - a collection of apps and generated static pages? I once used 
Camping 1.5 (running as CGI) as an easy way to make a simple multipage 
wireframe mockup, but...


Dave


I was wondering how we can help with next steps?
I keep seeing all the attention going to the Sinatra framework (and 
Rails of course) and would love to help more with promoting Camping. 
It would be great if one of our web designer / Camping friend could 
help create a catchy visual for the site. How about a night time view 
of a camp fire with a tent and maybe a small projector with a big 
silver screen where we could display rotating content / slides? Any 
other crazy concepts?


Philippe


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: restful camping with reststop

2010-03-22 Thread Philippe Monnet

Hi David,

I had played with RESTstop on the old Camping maybe six months ago.
I have now started to take a look at what the issues are about.
So far I have found a few things like:

In reststop.rb:
  - the service method needs to retrieve the REQUEST_METHOD using 
@env['REQUEST_METHOD']
  -the condition on the if statement on the last m.capture line of the 
render method needs to be adjusted (not sure what a[0] should be 
replaced with. So far I have temporarily replaced the line by:

 s = m.capture{send(:layout){s}} if m.respond_to?(:layout)

In the blog.rb example
  - the version number for camping needs to be updated
  - require 'camping/db' should be removed since now obsolete
  - require 'markaby' needs to be added

So far I can bring up the app in a browser, login, add a post.
But if I use Restr I can only do a GET. The PUT currently fails with a 
401. I will continue to try figuring it out over the next week or so.

It would be great if the initial author could help us out.

Philippe

On 3/12/2010 8:04 AM, David Susco wrote:

Has anyone managed to get camping to work with reststop using 1.9.354?

   


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: What now?

2010-03-21 Thread Philippe Monnet

I was wondering how we can help with next steps?
I keep seeing all the attention going to the Sinatra framework (and 
Rails of course) and would love to help more with promoting Camping. It 
would be great if one of our web designer / Camping friend could help 
create a catchy visual for the site. How about a night time view of a 
camp fire with a tent and maybe a small projector with a big silver 
screen where we could display rotating content / slides? Any other crazy 
concepts?


Philippe

On 10/18/2009 6:03 PM, Dave Everitt wrote:
Below: collated results for a Camping domain name, have added my prefs 
and all others. Perhaps we can increment/decrement these scores from 
now on to get a final result ;-)


[Philippe]: I feel that having the word Ruby in the name would be 
good for SEO and more likely to incite people not familiar with 
Camping to click on a link due to the association with Ruby.


agreed. 'rubycamping.com' is available (as are the others, I *think*). 
Also agree with the need to distinguish Camping from RoR, so not so 
sure about 'rubyoncamping.com'? For SEO it's common to have  1 
domain, with a primary one, so (say) 
'ruby-camping-framework.com/org/net' might be a good buy to forward to 
the chosen domain. Since this isn't a commercial site, I'd prefer 
.org/.net with the .com variation sitting there quietly - opinions?



rubycamping.com [9 +1]
campingframework.com [2 +1]
rubyoncamping.com [10 -1]
whywentcamping.com [1 +2] (cute but I wonder if people may skip the 
site link by thinking it has nothing to do with Ruby)


Dave

PS I have to sleep now.

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list



___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Are there existing sitemap generators for Camping?

2010-03-21 Thread Dave Everitt
For now, added to the wiki under 'Miscellaneous Camping links'. Be  
good to find a few more 'made with Camping' sites/apps to add to the  
list - anyone want to put up their app? - Dave Everitt


Magnus Holm wrote: Cool. We'll have to find a place on the wiki for  
these things :-)


Philippe Monnet wrote: I wrote a simple (and crude) Google sitemap  
generator - see http://gist.github.com/330973


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: What now?

2010-03-21 Thread Dave Everitt

Hi Philippe

I am one of those Camping friends (although I've been too busy with  
clients just lately to do much). Although I just posted links to your  
Camping 'add-ons' to the wiki :-)


I agree about Sinatra - from curiosity I've even dabbled with it  
myself (shame!), although it is nice that Camping still has a small  
community feel. Perhaps some _why-type cartoons (along the lines you  
suggest) might be the right way forward for a 'This is Camping'  
website. Or just keep things clean and minimal.


As for content, that was covered in another post to the list some  
time ago, as was a domain name. Magnus has the substance (tutorial,  
examples, etc.) and a nice CSS style for the blog example. Maybe  
start with a developed version of the Camping blog on Heroku (free)  
so we can each add Camping-related posts to keep things fresh?


It's just making enough time to put it all together... I'd be happy  
to chip in, but what's the best way to build a whole site that uses  
Camping - a collection of apps and generated static pages? I once  
used Camping 1.5 (running as CGI) as an easy way to make a simple  
multipage wireframe mockup, but...


Dave


I was wondering how we can help with next steps?
I keep seeing all the attention going to the Sinatra framework (and  
Rails of course) and would love to help more with promoting  
Camping. It would be great if one of our web designer / Camping  
friend could help create a catchy visual for the site. How about a  
night time view of a camp fire with a tent and maybe a small  
projector with a big silver screen where we could display rotating  
content / slides? Any other crazy concepts?


Philippe


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Are there existing sitemap generators for Camping?

2010-03-13 Thread Philippe Monnet
Since I could not find one, I wrote a simple (and crude) Google sitemap 
generator - see http://gist.github.com/330973


After pasting the code in your app controllers module, you just need to 
customize 2 things:


1) the base url of your site:

 SITE_BASE_URL = http://www.myapp.com;

2) list the controllers you want to expose on the sitemap (since you may 
not want to expose all controllers):


  def self.sitemap_candidates
 [ :Test1, :Test2 ]
  end

Have fun.

Philippe

On 3/8/2010 9:36 PM, Philippe Monnet wrote:
When searching I have found a few Rails-specific sitemap generators 
but I was wondering if anyone new of a Camping-specific implementation?


Philippe (techarch)


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Are there existing sitemap generators for Camping?

2010-03-13 Thread Magnus Holm
Cool. We'll have to find a place on the wiki for these things :-)

Couldn't you also figure out SITE_BASE_URL in GoogleSiteMap?
@request.url.gsub(/sitemap.xml, ) or something?
// Magnus Holm


On Sat, Mar 13, 2010 at 18:21, Philippe Monnet r...@monnet-usa.com wrote:

  Since I could not find one, I wrote a simple (and crude) Google sitemap
 generator - see http://gist.github.com/330973

 After pasting the code in your app controllers module, you just need to
 customize 2 things:

 1) the base url of your site:

  SITE_BASE_URL = http://www.myapp.com;

 2) list the controllers you want to expose on the sitemap (since you may
 not want to expose all controllers):

def self.sitemap_candidates
  [ :Test1, :Test2 ]
   end

 Have fun.

 Philippe


 On 3/8/2010 9:36 PM, Philippe Monnet wrote:

 When searching I have found a few Rails-specific sitemap generators but I
 was wondering if anyone new of a Camping-specific implementation?

 Philippe (techarch)



 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

New blog post on NewRelic performance and monitoring instrumentation for Camping apps

2010-03-10 Thread Philippe Monnet
For those of you who are interested in implementing NewRelic 
http://www.newrelic.com/ performance management on your Ruby Camping 
site, I recently posted a blog post explaining how to do that. See 
http://blog.monnet-usa.com/?p=223.
It relies on a NewRelic instrumentation plugin I wrote and that NewRelic 
integrated in their recent release.


Philippe (techarch on Twitter)
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Are there existing sitemap generators for Camping?

2010-03-08 Thread Philippe Monnet
When searching I have found a few Rails-specific sitemap generators but 
I was wondering if anyone new of a Camping-specific implementation?


Philippe (techarch)
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending data/overriding response headers?

2010-03-03 Thread Magnus Holm
Sure, just make sure to enable X-Sendfile in Apache/Nginx, and then set it
yourself:

  def get
@headers['X-Sendfile'] = /full/path/to/file
@headers['Content-Type'] = text/plain; charset=utf-8
  end

Or if you want Rack to figure out which Content-Type to send:

  file = /full/path/to/file
  @headers['X-Sendfile'] = file
  @headers['Content-Type'] = Rack::Mime.mime_type(File.extname(file)) + ;
charset=utf-8

If you ever need to send custom headers, just use the @headers hash.

// Magnus Holm


On Wed, Mar 3, 2010 at 16:43, David Susco dsu...@gmail.com wrote:

 Hey guys,

 A user would like to download a table dump as a CSV, what's the best
 way to do this?

 ActionController has send_data:

 http://api.rubyonrails.org/classes/ActionController/Streaming.html

 Is there something similar built into Camping?

 If not, is there a way to override the response headers of a
 controller to declare the response as something other than HTML (so
 the csv isn't displayed in the browser)?

 --
 Dave
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending data/overriding response headers?

2010-03-03 Thread Julik Tarkhanov


On 3 mrt 2010, at 16:43, David Susco wrote:


Is there something similar built into Camping?



Before it was so that you could return an IO object from your action  
and it would just work. Dunno if Camping 2 still supports this. A  
Content-Disposition header would be in order

so that your clients download a proper filename.

--
Julik Tarkhanov
m...@julik.nl





___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: sending data/overriding response headers?

2010-03-03 Thread Magnus Holm
In Camping 2 you can return an object which responds to #each and the server
will then stream it to the client. If you want the file to trigger a
download-box on the user, you'll have to send Content-Disposition as Julik
mentioned.

Something like this should work, although I'm not 100% sure:

  @headers['Content-Disposition'] = 'attachment; filename=table.csv'

// Magnus Holm


On Wed, Mar 3, 2010 at 17:04, Julik Tarkhanov julian.tarkha...@gmail.comwrote:


 On 3 mrt 2010, at 16:43, David Susco wrote:

  Is there something similar built into Camping?



 Before it was so that you could return an IO object from your action and it
 would just work. Dunno if Camping 2 still supports this. A
 Content-Disposition header would be in order
 so that your clients download a proper filename.

 --
 Julik Tarkhanov
 m...@julik.nl






 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

going into production, a few questions

2010-02-19 Thread David Susco
I have a few camping projects that are about to go into production in
a few weeks, just picking your brains to see if I can add some
robustness.

What's the best way to catch any Camping Problem! /XXX not found
errors that a user might see if they start typing URLs themselves?
Ideally I'd just like to redirect them all to some general index
controller.

I'm using MySQL for my database. I'm getting a few MySQL server has
gone away error messages every now and then. I did some searching and
found if reconnect: true is in the hash I send to
establish_connection that I should be all set. Can anyone confirm?
Also, any other MySQL connection best practices that I should be
following?

-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: going into production, a few questions

2010-02-19 Thread David Susco
Thanks on the 404 stuff, that was easy.

I'm going to stick with the reconnect = true until that is proving
not to work. It's the easiest as it's a one liner addition to my yaml.

Dave

On Fri, Feb 19, 2010 at 3:13 PM, Magnus Holm judo...@gmail.com wrote:
 404 on 1.5:
 module App::Controllers
   class NotFound
     def get(path)
       Do something with path
     end
   end
 end
 404 on 1.9/2.0:
 module App
   def r404(path)
     Do something with path
   end
 end
 There appears to be two solutions:
 Call ActiveRecord::Base.verify_active_connections! before every request (I
 think this is what Rails does by default):
 module VerifyConnection
   def service(*args)
     ActiveRecord::Base.verify_active_connections!
   ensure
     return super
   end
 end
 module App
   include VerifyConnection
 end
 Or, pass reconnect = true to establish_connection.
 I'm not quite sure what's best…
 // Magnus Holm


 On Fri, Feb 19, 2010 at 20:59, David Susco dsu...@gmail.com wrote:

 I have a few camping projects that are about to go into production in
 a few weeks, just picking your brains to see if I can add some
 robustness.

 What's the best way to catch any Camping Problem! /XXX not found
 errors that a user might see if they start typing URLs themselves?
 Ideally I'd just like to redirect them all to some general index
 controller.

 I'm using MySQL for my database. I'm getting a few MySQL server has
 gone away error messages every now and then. I did some searching and
 found if reconnect: true is in the hash I send to
 establish_connection that I should be all set. Can anyone confirm?
 Also, any other MySQL connection best practices that I should be
 following?

 --
 Dave
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list


 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list




-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: I want to use camping 2.0

2010-02-05 Thread Dave Everitt

Hi - take a look here:

http://stuff.judofyr.net/camping-docs/book/51_upgrading.html#from-15- 
to-20


DaveE


what is the difference between the two version ( 1.5.180 and 2.0) ?


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


gems.judofyr.net 404

2010-01-23 Thread Dave Everitt

I noticed today that this:
  gem install camping --source http://gems.judofyr.net

has broken, so wanted to update the wiki at Github so visitors can  
get the latest version via gem?


Dave Everitt
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: gems.judofyr.net 404

2010-01-23 Thread Magnus Holm
And it's back up again!

I'll try to get stuff.judofyr.net/camping-docs working too…

// Magnus Holm


On Sat, Jan 23, 2010 at 21:12, Dave Everitt dever...@innotts.co.uk wrote:

 I noticed today that this:
  gem install camping --source http://gems.judofyr.net

 has broken, so wanted to update the wiki at Github so visitors can get the
 latest version via gem?

 Dave Everitt
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org
 http://rubyforge.org/mailman/listinfo/camping-list

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Broken Camping (on Dreamhost)

2010-01-20 Thread Garret Buell
Hello all,
I'm running Camping 1.9.300 on DreamHost. Everything has been working
great for quite some time, then recently, visiting the Camping app
gives a 500 Internal Server Error. It seems as if something at
DreamHost was upgraded and now everything is broken. Even the basic
example Camping apps do not work so I suspect there is some
incompatibility with Camping and the current setup. I'm hoping someone
can help me figure out what is wrong.

Here is the relevant error log data:
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***]
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:150:in
`rewind': Illegal seek (Errno::ESPIPE)
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:150:in
`POST'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:160:in
`params'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
(eval):30:in `initialize'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
(eval):50:in `new'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
(eval):50:in `call'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
dispatch.cgi:16
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
`call'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
`call'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/cgi.rb:33:in
`serve'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/cgi.rb:7:in
`run'
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] \tfrom
dispatch.cgi:19
[Wed Jan 20 18:08:06 2010] [error] [client ***.***.***.***] Premature
end of script headers: dispatch.cgi

My dispatch.cgi worked previously and nothing has been modified but here it is:
#!/usr/bin/ruby

ENV['GEM_PATH'] = '/home/garret/.gems:/usr/lib/ruby/gems/1.8'
ENV['GEM_HOME'] = '/home/garret/.gems'

Dir.chdir '/home/garret/admin.*.com'

require 'admin'
app = Admin

fixed = lambda do |env|
  r = env[REQUEST_URI][0..(env[REQUEST_URI].index(?)||0)-1]
  d = r.length - (env[PATH_INFO]||'/').length
  env[SCRIPT_NAME] = r[0...d]
  env[PATH_INFO] = r[d..-1]
  app.call(env)
end

Rack::Handler::CGI.run(fixed)


The
require 'admin'
app = Admin

can be replaced with any of the sample apps I've found with the same effect.

Help?

Thanks,
Garret Buell
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


<    3   4   5   6   7   8   9   10   11   12   >