redditkit 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf49ee7e4888671f3860d38d4a794b6594207827
4
- data.tar.gz: 9495006c5cc268dd6df62780c97017521239c17f
3
+ metadata.gz: e238756c1925ce84c5d427e7c2c87fc176c376bc
4
+ data.tar.gz: 578a1aba9324a817ae38431f2b269584560c6014
5
5
  SHA512:
6
- metadata.gz: d9e8b304a65560e2df483a9b0b55bfb8811647691e61afdb71ed454e7653fee11e8db600e28c23d6f944ff634e30d9d32a422994abe9fc96de9d8e143d9d59d6
7
- data.tar.gz: b5fbc3f4729e5ed803d029d206369ff80132d697f73cd099fdb56fab15aaad9b0a049b84c7e548f0ebe29e57f5f791e57616c0b8661399cec172cea4f45c296c
6
+ metadata.gz: c9a62dae47cf215362ad7b12423e975f3e8ec0d8b9d77e76eac7cc0f2c1e08cd56d48d1814695e49560fd30a25747b65a0d2953d0db34dc96f54bc58c75e5d33
7
+ data.tar.gz: da91b90dbe57312fddda981f374f69aa61ced51b73e7a431c8cdd84d29fa5b84ff35609c7889c5eb58a292a59f84bd3cc387f05490615fae99075c042eceb123
@@ -11,7 +11,7 @@ module RedditKit
11
11
  response = get('api/needs_captcha.json', nil)
12
12
  needs_captcha = response[:body]
13
13
 
14
- needs_captcha == 'true'
14
+ needs_captcha.to_s == 'true'
15
15
  end
16
16
 
17
17
  # Returns a new CATPCHA identifier.
@@ -75,14 +75,23 @@ module RedditKit
75
75
  # @option options [String] :text The text value for the post, as Markdown.
76
76
  # @option options [String] :captcha_identifier An identifier for a CAPTCHA, if the current user is required to fill one out.
77
77
  # @option options [String] :captcha_value The value for the CAPTCHA with the given identifier, as filled out by the user.
78
+ # @option options [Boolean] :save If true, the link will be implicitly saved after submission.
78
79
  def submit(title, subreddit, options = {})
79
80
  subreddit_name = extract_string subreddit, :display_name
80
- parameters = { :title => title, :sr => subreddit_name, :iden => options[:captcha_identifier], :captcha => options[:captcha_value] }
81
+ parameters = {
82
+ :title => title,
83
+ :sr => subreddit_name,
84
+ :iden => options[:captcha_identifier],
85
+ :captcha => options[:captcha_value],
86
+ :save => options[:save]
87
+ }
81
88
 
82
89
  if options[:url]
83
90
  parameters[:url] = options[:url]
91
+ parameters[:kind] = 'link'
84
92
  else
85
93
  parameters[:text] = options[:text]
94
+ parameters[:kind] = 'self'
86
95
  end
87
96
 
88
97
  post('api/submit', parameters)
@@ -57,12 +57,11 @@ module RedditKit
57
57
 
58
58
  # Distinguishes a comment as being posted by a moderator or admin.
59
59
  #
60
- # @option options [String, RedditKit::Comment] comment The full name of a comment, or a RedditKit::Comment.
61
- # @option options [yes, no, admin, special] distinguish How to distinguish the comment. Defaults to yes.
60
+ # @param comment [String, RedditKit::Comment] The full name of a comment, or a RedditKit::Comment.
61
+ # @param how [yes, no, admin, special] How to distinguish the comment. Defaults to yes.
62
62
  # @note admin and special values may only be used if the current user has the right privileges.
63
- def distinguish(options)
64
- full_name = extract_full_name options[:comment]
65
- how = options[:distinguish] || :yes
63
+ def distinguish(comment, how = 'yes')
64
+ full_name = extract_full_name comment
66
65
  parameters = { :id => full_name, :api_type => :json }
67
66
 
68
67
  post("api/distinguish/#{how}", parameters)
@@ -151,7 +150,7 @@ module RedditKit
151
150
 
152
151
  # Lift the ban on a user. This requires moderator privileges on the specified subreddit.
153
152
  #
154
- # @param ban_or_unban [true, false] Whether to ban or unban the user.
153
+ # @param ban [true, false] Whether to ban or unban the user.
155
154
  # @param user [String, RedditKit::User] The user's username, or a RedditKit::User.
156
155
  # @param subreddit [String, RedditKit::Subreddit] The subreddit's name, or a RedditKit::Subreddit.
157
156
  def ban_or_unban_user(ban, user, subreddit)
@@ -7,16 +7,29 @@ module RedditKit
7
7
  # Search for links.
8
8
  #
9
9
  # @param query [String] The search query.
10
- # @option options [true, false] :restrict_to_subreddit Whether to search only in a specified subreddit.
11
- # @option options [String, RedditKit::Subreddit] :subreddit The optional subreddit to search.
10
+ # @option options [String, RedditKit::Subreddit] subreddit The optional subreddit to search.
11
+ # @option options [true, false] restrict_to_subreddit Whether to search only in a specified subreddit.
12
12
  # @option options [1..100] limit The number of links to return.
13
+ # @option options [String] count The number of results to return before or after. This is different from `limit`.
14
+ # @option options [relevance, new, hot, top, comments] sort The sorting order for search results.
13
15
  # @option options [String] before Only return links before this full name.
14
16
  # @option options [String] after Only return links after this full name.
17
+ # @option options [cloudsearch, lucene, plain] syntax Specify the syntax for the search. Learn more: http://www.reddit.com/r/redditdev/comments/1hpicu/whats_this_syntaxcloudsearch_do/cawm0fe
18
+ # @option options [hour, day, week, month, year, all] time Show results with a specific time period.
15
19
  # @return [RedditKit::PaginatedResponse]
16
20
  def search(query, options = {})
17
21
  path = "%s/search.json" % ('r/' + options[:subreddit] if options[:subreddit])
18
- parameters = { :q => query, :restrict_sr => options[:restrict_to_subreddit], :limit => options[:limit] }
19
-
22
+ parameters = { :q => query,
23
+ :restrict_sr => options[:restrict_to_subreddit],
24
+ :limit => options[:limit],
25
+ :count => options[:count],
26
+ :sort => options[:sort],
27
+ :before => options[:before],
28
+ :after => options[:after],
29
+ :syntax => options[:syntax],
30
+ :t => options[:time]
31
+ }
32
+
20
33
  objects_from_response(:get, path, parameters)
21
34
  end
22
35
 
@@ -87,8 +87,6 @@ module RedditKit
87
87
  def username_available?(username)
88
88
  response = get('api/username_available.json', :user => username)
89
89
  available = response[:body]
90
-
91
- available == 'true'
92
90
  end
93
91
 
94
92
  # Registers a new reddit account.
@@ -1,6 +1,7 @@
1
1
  require 'redditkit/thing'
2
2
  require 'redditkit/creatable'
3
3
  require 'redditkit/votable'
4
+ require 'htmlentities'
4
5
 
5
6
  module RedditKit
6
7
 
@@ -105,6 +106,17 @@ module RedditKit
105
106
  alias total_comments num_comments
106
107
  alias total_reports num_reports
107
108
 
109
+ def title
110
+ @escaped_title ||= HTMLEntities.new.decode(@attributes[:title])
111
+ end
112
+
113
+ # The link's URL. This will be a link to the post on reddit if the link is a self post.
114
+ #
115
+ # @note This is HTML decoded as reddit encodes their JSON, meaning links which have parameters will be returned incorrectly.
116
+ def url
117
+ @escaped_url ||= HTMLEntities.new.decode(@attributes[:url])
118
+ end
119
+
108
120
  # Determines whether a link is showing its score. reddit doesn't display scores for links less than two hours old.
109
121
  #
110
122
  # @return [Boolean]
@@ -1,5 +1,5 @@
1
1
  require 'faraday'
2
- require 'json'
2
+ require 'multi_json'
3
3
 
4
4
  module RedditKit
5
5
 
@@ -13,8 +13,8 @@ module RedditKit
13
13
  # an application/json header, we want to return the body itself if the
14
14
  # JSON parsing fails, because the response is still likely useful.
15
15
  def parse(body)
16
- JSON.parse(body, :symbolize_names => true) unless body.nil?
17
- rescue JSON::ParserError
16
+ MultiJson.load(body, :symbolize_keys => true) unless body.nil?
17
+ rescue MultiJson::LoadError
18
18
  body
19
19
  end
20
20
 
@@ -4,7 +4,7 @@ module RedditKit
4
4
  class Version
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  class << self
10
10
 
data/redditkit.gemspec CHANGED
@@ -21,5 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ["lib"]
22
22
 
23
23
  spec.add_dependency 'faraday', "~> 0.8"
24
- spec.add_development_dependency 'dotenv'
24
+ spec.add_dependency 'htmlentities', "~> 4.3"
25
+ spec.add_dependency 'multi_json', '~> 1.8'
26
+
27
+ spec.add_development_dependency 'dotenv', '~> 0.9', '>= 0.9.0'
25
28
  end
@@ -875,4 +875,887 @@ http_interactions:
875
875
  null}}], \"after\": \"t3_a7he5\", \"before\": null}}"
876
876
  http_version:
877
877
  recorded_at: Sun, 10 Nov 2013 22:21:30 GMT
878
- recorded_with: VCR 2.6.0
878
+ - request:
879
+ method: get
880
+ uri: http://www.reddit.com/r/ruby/search.json?after&before&count&limit&q=ruby&restrict_sr=true&sort&syntax&t
881
+ body:
882
+ encoding: US-ASCII
883
+ string: ''
884
+ headers:
885
+ User-Agent:
886
+ - Faraday v0.8.8
887
+ Accept-Encoding:
888
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
889
+ Accept:
890
+ - "*/*"
891
+ response:
892
+ status:
893
+ code: 200
894
+ message: OK
895
+ headers:
896
+ Content-Type:
897
+ - application/json; charset=UTF-8
898
+ X-Frame-Options:
899
+ - SAMEORIGIN
900
+ Access-Control-Allow-Origin:
901
+ - "*"
902
+ Server:
903
+ - "'; DROP TABLE servertypes; --"
904
+ Vary:
905
+ - accept-encoding
906
+ Date:
907
+ - Wed, 08 Jan 2014 06:49:53 GMT
908
+ Transfer-Encoding:
909
+ - chunked
910
+ Connection:
911
+ - Transfer-Encoding
912
+ - keep-alive
913
+ body:
914
+ encoding: UTF-8
915
+ string: "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\":
916
+ [{\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
917
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
918
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Hello &lt;a href=\\\"/r/ruby\\\"&gt;/r/ruby&lt;/a&gt;
919
+ &lt;/p&gt;\\n\\n&lt;p&gt;I am new to Ruby, however I&amp;#39;ve programmed
920
+ in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python. &lt;/p&gt;\\n\\n&lt;p&gt;I&amp;#39;ve
921
+ heard that Ruby is a bit different and has quite the steep learning curve.
922
+ So I ask you...&lt;/p&gt;\\n\\n&lt;p&gt;What is the one thing that you wish
923
+ you knew before starting to learn or really use Ruby?&lt;/p&gt;\\n\\n&lt;p&gt;I
924
+ also plan on using RoR if anyone has thoughts on that as well!&lt;/p&gt;\\n\\n&lt;p&gt;Any
925
+ comments are appreciated! Thanks Guys!&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON
926
+ --&gt;\", \"selftext\": \"Hello /r/ruby \\n\\nI am new to Ruby, however I've
927
+ programmed in C, C++, Java, and C# along with VB.NET, HTML, and minimal Python.
928
+ \\n\\nI've heard that Ruby is a bit different and has quite the steep learning
929
+ curve. So I ask you...\\n\\nWhat is the one thing that you wish you knew before
930
+ starting to learn or really use Ruby?\\n\\nI also plan on using RoR if anyone
931
+ has thoughts on that as well!\\n\\nAny comments are appreciated! Thanks Guys!\",
932
+ \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
933
+ \"1j9wqw\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
934
+ false, \"author\": \"ProductiveThings\", \"media\": null, \"score\": 56, \"approved_by\":
935
+ null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
936
+ \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
937
+ null, \"downs\": 9, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
938
+ \"name\": \"t3_1j9wqw\", \"created\": 1375108691.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1j9wqw/what_is_one_thing_you_wish_you_knew_when_starting/\",
939
+ \"author_flair_text\": null, \"title\": \"What is one thing you wish you knew
940
+ when starting Ruby?\", \"created_utc\": 1375105091.0, \"ups\": 65, \"num_comments\":
941
+ 81, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
942
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
943
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
944
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;...and thanks to everyone
945
+ in &lt;a href=\\\"/r/ruby\\\"&gt;/r/ruby&lt;/a&gt;, &lt;a href=\\\"/r/rails\\\"&gt;/r/rails&lt;/a&gt;
946
+ and &lt;a href=\\\"/r/programming\\\"&gt;/r/programming&lt;/a&gt; who helped
947
+ me gain not only the skills but the confidence to make the switch. I&amp;#39;ve
948
+ been a lifelong marketer who always felt unfulfilled and spent nights/weekends/free
949
+ time learning Ruby, Rails, MySQL, PostgreSQL, jQuery, and more, finally culminating
950
+ in my first full-time development job. Wish me luck!&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
951
+ SC_ON --&gt;\", \"selftext\": \"...and thanks to everyone in /r/ruby, /r/rails
952
+ and /r/programming who helped me gain not only the skills but the confidence
953
+ to make the switch. I've been a lifelong marketer who always felt unfulfilled
954
+ and spent nights/weekends/free time learning Ruby, Rails, MySQL, PostgreSQL,
955
+ jQuery, and more, finally culminating in my first full-time development job.
956
+ \ Wish me luck!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
957
+ null, \"id\": \"1i72ww\", \"secure_media_embed\": {}, \"clicked\": false,
958
+ \"stickied\": false, \"author\": \"caadbury\", \"media\": null, \"score\":
959
+ 86, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
960
+ \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
961
+ null, \"author_flair_css_class\": null, \"downs\": 24, \"saved\": false, \"is_self\":
962
+ true, \"permalink\": \"/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
963
+ \"name\": \"t3_1i72ww\", \"created\": 1373686161.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1i72ww/on_monday_i_start_a_new_career_as_a_web_developer/\",
964
+ \"author_flair_text\": null, \"title\": \"On Monday, I start a new career
965
+ as a web developer in Ruby on Rails\", \"created_utc\": 1373682561.0, \"ups\":
966
+ 110, \"num_comments\": 49, \"visited\": false, \"num_reports\": null, \"distinguished\":
967
+ null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
968
+ null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
969
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Hello everyone,&lt;/p&gt;\\n\\n&lt;p&gt;This
970
+ is a little framework of mine that I&amp;#39;ve built out of a personal need
971
+ - basically, I wanted to write a desktop app using Ruby and I found it daunting
972
+ to say the least.&lt;/p&gt;\\n\\n&lt;p&gt;So, I&amp;#39;ve built Freightrain
973
+ to take care of all the stuff I really shouldn&amp;#39;t care about, like
974
+ loading interface definitions, cross-toolkit compatibility and the likes.&lt;/p&gt;\\n\\n&lt;p&gt;Now
975
+ I&amp;#39;ve been working on it for almost 2 years (on and off of course)
976
+ and, since I&amp;#39;ve just fixed it so it loads the newest glade specifications,
977
+ I thought that I could ask you guys for an evaluation.&lt;/p&gt;\\n\\n&lt;p&gt;There&amp;#39;s
978
+ a little readme on the github page and there are some examples in the /examples
979
+ folder.&lt;/p&gt;\\n\\n&lt;p&gt;&lt;a href=\\\"http://github.com/bolthar/freightrain\\\"&gt;Link
980
+ to the github page!&lt;/a&gt;&lt;/p&gt;\\n\\n&lt;p&gt;WHOA! Thanks for the
981
+ attention, I thought this was going to be ignored...&lt;/p&gt;\\n\\n&lt;p&gt;How
982
+ many of you would be interested in a step by step tutorial over the major
983
+ features? I will build that if there&amp;#39;s enough interest.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
984
+ SC_ON --&gt;\", \"selftext\": \"Hello everyone,\\n\\nThis is a little framework
985
+ of mine that I've built out of a personal need - basically, I wanted to write
986
+ a desktop app using Ruby and I found it daunting to say the least.\\n\\nSo,
987
+ I've built Freightrain to take care of all the stuff I really shouldn't care
988
+ about, like loading interface definitions, cross-toolkit compatibility and
989
+ the likes.\\n\\nNow I've been working on it for almost 2 years (on and off
990
+ of course) and, since I've just fixed it so it loads the newest glade specifications,
991
+ I thought that I could ask you guys for an evaluation.\\n\\nThere's a little
992
+ readme on the github page and there are some examples in the /examples folder.\\n\\n[Link
993
+ to the github page!](http://github.com/bolthar/freightrain)\\n\\nWHOA! Thanks
994
+ for the attention, I thought this was going to be ignored...\\n\\nHow many
995
+ of you would be interested in a step by step tutorial over the major features?
996
+ I will build that if there's enough interest.\", \"likes\": null, \"secure_media\":
997
+ null, \"link_flair_text\": null, \"id\": \"sk4qq\", \"secure_media_embed\":
998
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"bolthar\", \"media\":
999
+ null, \"score\": 161, \"approved_by\": null, \"over_18\": false, \"hidden\":
1000
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": true,
1001
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1002
+ 12, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
1003
+ \"name\": \"t3_sk4qq\", \"created\": 1334952179.0, \"url\": \"http://www.reddit.com/r/ruby/comments/sk4qq/freightrain_easy_ruby_desktop_development/\",
1004
+ \"author_flair_text\": null, \"title\": \"Freightrain - easy Ruby desktop
1005
+ development\", \"created_utc\": 1334948579.0, \"ups\": 173, \"num_comments\":
1006
+ 32, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1007
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1008
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1009
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;m learning Ruby
1010
+ on codecademy, and intending to learn rails after that. I was told by a dev
1011
+ friend that both Ruby and Ruby on Rails are outdated and bloated. He reckons
1012
+ that Javascript is better and more relevant. Is this true? I&amp;#39;ve been
1013
+ really enjoying learning, is it worthwhile? &lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1014
+ SC_ON --&gt;\", \"selftext\": \"I'm learning Ruby on codecademy, and intending
1015
+ to learn rails after that. I was told by a dev friend that both Ruby and Ruby
1016
+ on Rails are outdated and bloated. He reckons that Javascript is better and
1017
+ more relevant. Is this true? I've been really enjoying learning, is it worthwhile?
1018
+ \", \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
1019
+ \"1uivc3\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
1020
+ false, \"author\": \"KingPimpCommander\", \"media\": null, \"score\": 21,
1021
+ \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
1022
+ \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
1023
+ null, \"author_flair_css_class\": null, \"downs\": 18, \"saved\": false, \"is_self\":
1024
+ true, \"permalink\": \"/r/ruby/comments/1uivc3/is_ruby_outdated/\", \"name\":
1025
+ \"t3_1uivc3\", \"created\": 1389021421.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1uivc3/is_ruby_outdated/\",
1026
+ \"author_flair_text\": null, \"title\": \"Is Ruby outdated?\", \"created_utc\":
1027
+ 1388992621.0, \"ups\": 39, \"num_comments\": 86, \"visited\": false, \"num_reports\":
1028
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1029
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1030
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;ve
1031
+ been trying to figure this one out in past few days and I&amp;#39;m quite
1032
+ unable to come up with reasonable answer.&lt;/p&gt;\\n\\n&lt;ul&gt;\\n&lt;li&gt;We
1033
+ have GitHub, most awesomest &lt;em&gt;social network&lt;/em&gt; on the internet.&lt;/li&gt;\\n&lt;li&gt;We
1034
+ have RubyGems, centralized libraries for everything.&lt;/li&gt;\\n&lt;li&gt;We
1035
+ have JRuby, for those who want to stick in the Java world or do some real
1036
+ threading.&lt;/li&gt;\\n&lt;li&gt;We have Rails, possibly the best web framework
1037
+ available (django people please don&amp;#39;t burry me alive)&lt;/li&gt;\\n&lt;li&gt;We
1038
+ have RSpec and Cucumber, which make me cry when I have to work with JUnit.&lt;/li&gt;\\n&lt;li&gt;We
1039
+ have great cloud hosting solutions like Heroku and Engine Yard.&lt;/li&gt;\\n&lt;li&gt;We
1040
+ have huge number of screencasts and tutorials, especially those high quality
1041
+ ones (Peepcode, Think Vitamin, Railscasts).&lt;/li&gt;\\n&lt;li&gt;Last but
1042
+ not least, we have Ruby, language which is fun to work with, expressive ...
1043
+ well you know.&lt;/li&gt;\\n&lt;/ul&gt;\\n\\n&lt;p&gt;The list could go on
1044
+ and on, so I guess you get my point. &lt;/p&gt;\\n\\n&lt;p&gt;My question
1045
+ is: &lt;strong&gt;What is missing? What do we need, but don&amp;#39;t (yet)
1046
+ have?&lt;/strong&gt;&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON --&gt;\", \"selftext\":
1047
+ \"I've been trying to figure this one out in past few days and I'm quite unable
1048
+ to come up with reasonable answer.\\n\\n* We have GitHub, most awesomest *social
1049
+ network* on the internet.\\n* We have RubyGems, centralized libraries for
1050
+ everything.\\n* We have JRuby, for those who want to stick in the Java world
1051
+ or do some real threading.\\n* We have Rails, possibly the best web framework
1052
+ available (django people please don't burry me alive)\\n* We have RSpec and
1053
+ Cucumber, which make me cry when I have to work with JUnit.\\n* We have great
1054
+ cloud hosting solutions like Heroku and Engine Yard.\\n* We have huge number
1055
+ of screencasts and tutorials, especially those high quality ones (Peepcode,
1056
+ Think Vitamin, Railscasts).\\n* Last but not least, we have Ruby, language
1057
+ which is fun to work with, expressive ... well you know.\\n\\nThe list could
1058
+ go on and on, so I guess you get my point. \\n\\nMy question is: **What is
1059
+ missing? What do we need, but don't (yet) have?**\", \"likes\": null, \"secure_media\":
1060
+ null, \"link_flair_text\": null, \"id\": \"elygz\", \"secure_media_embed\":
1061
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"progfu\", \"media\":
1062
+ null, \"score\": 39, \"approved_by\": null, \"over_18\": false, \"hidden\":
1063
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1064
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1065
+ 10, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/elygz/what_is_the_biggest_current_problem_in_ruby/\",
1066
+ \"name\": \"t3_elygz\", \"created\": 1292377299.0, \"url\": \"http://www.reddit.com/r/ruby/comments/elygz/what_is_the_biggest_current_problem_in_ruby/\",
1067
+ \"author_flair_text\": null, \"title\": \"What is the biggest current problem
1068
+ in Ruby community?\", \"created_utc\": 1292377299.0, \"ups\": 49, \"num_comments\":
1069
+ 134, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1070
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1071
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1072
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Whats the best way to set
1073
+ up Ruby on Rails on OSx -- Newbie, and trying to figure out how to use Ruby
1074
+ on rails on my macbook &lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON --&gt;\", \"selftext\":
1075
+ \"Whats the best way to set up Ruby on Rails on OSx -- Newbie, and trying
1076
+ to figure out how to use Ruby on rails on my macbook \", \"likes\": null,
1077
+ \"secure_media\": null, \"link_flair_text\": null, \"id\": \"zm1uu\", \"secure_media_embed\":
1078
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"sirisaac87\", \"media\":
1079
+ null, \"score\": 27, \"approved_by\": null, \"over_18\": false, \"hidden\":
1080
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1081
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1082
+ 6, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/zm1uu/setup_ruby_on_rails_on_osx/\",
1083
+ \"name\": \"t3_zm1uu\", \"created\": 1347219823.0, \"url\": \"http://www.reddit.com/r/ruby/comments/zm1uu/setup_ruby_on_rails_on_osx/\",
1084
+ \"author_flair_text\": null, \"title\": \"Setup Ruby on Rails on OSX -- \",
1085
+ \"created_utc\": 1347216223.0, \"ups\": 33, \"num_comments\": 54, \"visited\":
1086
+ false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
1087
+ \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
1088
+ {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div
1089
+ class=\\\"md\\\"&gt;&lt;p&gt;So jamesgolick was kind enough to make me moderator
1090
+ of the community. I want to make a promise to you guys that I&amp;#39;ll do
1091
+ my best to keep it clean.&lt;/p&gt;\\n\\n&lt;p&gt;If you have any requests
1092
+ please let me know (like a valid link for the side navigation).&lt;/p&gt;\\n\\n&lt;p&gt;How
1093
+ do you want to see r/ruby improved? - A contest, guides, removing spam, etc.
1094
+ Let me know!&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON --&gt;\", \"selftext\":
1095
+ \"So jamesgolick was kind enough to make me moderator of the community. I
1096
+ want to make a promise to you guys that I'll do my best to keep it clean.\\n\\nIf
1097
+ you have any requests please let me know (like a valid link for the side navigation).\\n\\nHow
1098
+ do you want to see r/ruby improved? - A contest, guides, removing spam, etc.
1099
+ Let me know!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
1100
+ null, \"id\": \"g1pia\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
1101
+ false, \"author\": \"ViralInfection\", \"media\": null, \"score\": 35, \"approved_by\":
1102
+ null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
1103
+ \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
1104
+ null, \"downs\": 8, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/g1pia/hello_rruby_im_your_new_moderator_how_would_you/\",
1105
+ \"name\": \"t3_g1pia\", \"created\": 1299819313.0, \"url\": \"http://www.reddit.com/r/ruby/comments/g1pia/hello_rruby_im_your_new_moderator_how_would_you/\",
1106
+ \"author_flair_text\": null, \"title\": \"Hello r/ruby. I'm your new moderator,
1107
+ how would you improve r/ruby?\", \"created_utc\": 1299819313.0, \"ups\": 43,
1108
+ \"num_comments\": 53, \"visited\": false, \"num_reports\": null, \"distinguished\":
1109
+ null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
1110
+ null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1111
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;m working my way
1112
+ through Zed&amp;#39;s &lt;em&gt;Learn Ruby the Hard Way&lt;/em&gt; and just
1113
+ completed my first week-long, make-your-own-game section.&lt;/p&gt;\\n\\n&lt;p&gt;Here
1114
+ it is on github (also my first repo):\\n&lt;a href=\\\"https://github.com/demiankz/escapezeta.git\\\"&gt;https://github.com/demiankz/escapezeta.git&lt;/a&gt;&lt;/p&gt;\\n\\n&lt;p&gt;I&amp;#39;ve
1115
+ used most of what I know about ruby to make this game: functions, global variables,
1116
+ arrays, if/else, .include?, booleans, and a couple other random things. I
1117
+ have a feeling that there are major flaws in my code (nested if/else and global
1118
+ variables first among them, I&amp;#39;m sure).&lt;/p&gt;\\n\\n&lt;p&gt;I&amp;#39;d
1119
+ love to hear how an experienced rubyist would improve on my attempt.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1120
+ SC_ON --&gt;\", \"selftext\": \"I'm working my way through Zed's *Learn Ruby
1121
+ the Hard Way* and just completed my first week-long, make-your-own-game section.\\n\\nHere
1122
+ it is on github (also my first repo):\\nhttps://github.com/demiankz/escapezeta.git\\n\\nI've
1123
+ used most of what I know about ruby to make this game: functions, global variables,
1124
+ arrays, if/else, .include?, booleans, and a couple other random things. I
1125
+ have a feeling that there are major flaws in my code (nested if/else and global
1126
+ variables first among them, I'm sure).\\n\\nI'd love to hear how an experienced
1127
+ rubyist would improve on my attempt.\", \"likes\": null, \"secure_media\":
1128
+ null, \"link_flair_text\": null, \"id\": \"1eqond\", \"secure_media_embed\":
1129
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"demiankz\", \"media\":
1130
+ null, \"score\": 41, \"approved_by\": null, \"over_18\": false, \"hidden\":
1131
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1132
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1133
+ 2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1eqond/my_first_ruby_game_what_did_i_do_rightwrong/\",
1134
+ \"name\": \"t3_1eqond\", \"created\": 1369109135.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1eqond/my_first_ruby_game_what_did_i_do_rightwrong/\",
1135
+ \"author_flair_text\": null, \"title\": \"My first Ruby game. What did I do
1136
+ right/wrong?\", \"created_utc\": 1369105535.0, \"ups\": 43, \"num_comments\":
1137
+ 55, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1138
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1139
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1140
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;They only kept one guy on
1141
+ the API team and he&amp;#39;s been there from the beginning. I&amp;#39;ve
1142
+ done a few rails projects but not enough to consider myself a rails developer
1143
+ guru. Any jobs for guys with just ruby experience?&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1144
+ SC_ON --&gt;\", \"selftext\": \"They only kept one guy on the API team and
1145
+ he's been there from the beginning. I've done a few rails projects but not
1146
+ enough to consider myself a rails developer guru. Any jobs for guys with just
1147
+ ruby experience?\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
1148
+ null, \"id\": \"1nylih\", \"secure_media_embed\": {}, \"clicked\": false,
1149
+ \"stickied\": false, \"author\": \"Solnse\", \"media\": null, \"score\": 34,
1150
+ \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
1151
+ \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
1152
+ null, \"author_flair_css_class\": null, \"downs\": 6, \"saved\": false, \"is_self\":
1153
+ true, \"permalink\": \"/r/ruby/comments/1nylih/company_downsized_today_i_got_caught_in_the/\",
1154
+ \"name\": \"t3_1nylih\", \"created\": 1381207667.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1nylih/company_downsized_today_i_got_caught_in_the/\",
1155
+ \"author_flair_text\": null, \"title\": \"Company downsized today. I got caught
1156
+ in the layoff spree. Where is the best place for a ruby dev to search for
1157
+ a stable job?\", \"created_utc\": 1381204067.0, \"ups\": 40, \"num_comments\":
1158
+ 56, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1159
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1160
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1161
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;start with straight ruby
1162
+ or go to rails?\\nI started with HTML/CSS/PHP/javascript with no frameworks
1163
+ and am wondering if i would be better to start with straight ruby as well.
1164
+ &lt;/p&gt;\\n\\n&lt;p&gt;Thanks all.!!&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON
1165
+ --&gt;\", \"selftext\": \"start with straight ruby or go to rails?\\nI started
1166
+ with HTML/CSS/PHP/javascript with no frameworks and am wondering if i would
1167
+ be better to start with straight ruby as well. \\n\\nThanks all.!!\", \"likes\":
1168
+ null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"widgp\",
1169
+ \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
1170
+ \"swiftpants\", \"media\": null, \"score\": 21, \"approved_by\": null, \"over_18\":
1171
+ false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
1172
+ \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
1173
+ null, \"downs\": 2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/widgp/newb_to_ruby_should_i/\",
1174
+ \"name\": \"t3_widgp\", \"created\": 1342206260.0, \"url\": \"http://www.reddit.com/r/ruby/comments/widgp/newb_to_ruby_should_i/\",
1175
+ \"author_flair_text\": null, \"title\": \"newb to ruby.. should I\", \"created_utc\":
1176
+ 1342202660.0, \"ups\": 23, \"num_comments\": 50, \"visited\": false, \"num_reports\":
1177
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1178
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1179
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;This
1180
+ is a translation of &lt;a href=\\\"http://www.nikkan.co.jp/news/nkx0220110919aaac.html\\\"&gt;an
1181
+ article by \\u65e5\\u520a\\u5de5\\u696d\\u65b0\\u805e (nikkan)&lt;/a&gt; which
1182
+ is a publication dedicated to industry news in Japan.&lt;/p&gt;\\n\\n&lt;p&gt;The
1183
+ Japan based Ruby language is set to become an international standard in 2012
1184
+ through the International Organization for Standardization (ISO). Ruby was
1185
+ already standardized through Japanese Industrial Standards (JIS), and the
1186
+ focus will now be directed towards its recognition in the global community
1187
+ by becoming an official ISO standard. This would be the first time a programming
1188
+ language of Japanese origin would become an ISO standard. The nation of Japan
1189
+ hopes that this will increase its recognition in the primarily western dominated
1190
+ software field.&lt;/p&gt;\\n\\n&lt;p&gt;Ruby was developed by fellow Yukihiro
1191
+ Matsumoto at the National Applied Communication Laboratory (Matsue city).
1192
+ Features such as the ability to architect high level applications with ease
1193
+ has gained Ruby fast popularity around web development both inside and outside
1194
+ the country.&lt;/p&gt;\\n\\n&lt;p&gt;The ISO standardization of Ruby is being
1195
+ pushed by the Information-technology Promotion Agency (IPA). Domestically
1196
+ Ruby became a JIS standard (JIS X3017) in March from a proposal by the Ruby
1197
+ Standardization Study Working Group.&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON
1198
+ --&gt;\", \"selftext\": \"This is a translation of [an article by \\u65e5\\u520a\\u5de5\\u696d\\u65b0\\u805e
1199
+ (nikkan)](http://www.nikkan.co.jp/news/nkx0220110919aaac.html) which is a
1200
+ publication dedicated to industry news in Japan.\\n\\n The Japan based Ruby
1201
+ language is set to become an international standard in 2012 through the International
1202
+ Organization for Standardization (ISO). Ruby was already standardized through
1203
+ Japanese Industrial Standards (JIS), and the focus will now be directed towards
1204
+ its recognition in the global community by becoming an official ISO standard.
1205
+ This would be the first time a programming language of Japanese origin would
1206
+ become an ISO standard. The nation of Japan hopes that this will increase
1207
+ its recognition in the primarily western dominated software field.\\n\\n Ruby
1208
+ was developed by fellow Yukihiro Matsumoto at the National Applied Communication
1209
+ Laboratory (Matsue city). Features such as the ability to architect high level
1210
+ applications with ease has gained Ruby fast popularity around web development
1211
+ both inside and outside the country.\\n\\n The ISO standardization of Ruby
1212
+ is being pushed by the Information-technology Promotion Agency (IPA). Domestically
1213
+ Ruby became a JIS standard (JIS X3017) in March from a proposal by the Ruby
1214
+ Standardization Study Working Group.\", \"likes\": null, \"secure_media\":
1215
+ null, \"link_flair_text\": null, \"id\": \"kk5ln\", \"secure_media_embed\":
1216
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"cwgem\", \"media\":
1217
+ null, \"score\": 61, \"approved_by\": null, \"over_18\": false, \"hidden\":
1218
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1219
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1220
+ 2, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/kk5ln/ruby_to_be_the_first_japanese_made_programming/\",
1221
+ \"name\": \"t3_kk5ln\", \"created\": 1316409512.0, \"url\": \"http://www.reddit.com/r/ruby/comments/kk5ln/ruby_to_be_the_first_japanese_made_programming/\",
1222
+ \"author_flair_text\": null, \"title\": \"Ruby to be the first Japanese made
1223
+ programming language to become an international standard sometime next year\",
1224
+ \"created_utc\": 1316405912.0, \"ups\": 63, \"num_comments\": 10, \"visited\":
1225
+ false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
1226
+ \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
1227
+ {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div
1228
+ class=\\\"md\\\"&gt;&lt;p&gt;I was going through github, and I came across
1229
+ a simple tictactoe program. It surprised me how clever the programmer was
1230
+ with blocks and yields and such. I wrote a tictactoe program myself months
1231
+ ago when I was learning Ruby, and when I compare the two, my code is very
1232
+ clunky and not at all as elegant as this programmer. &lt;/p&gt;\\n\\n&lt;p&gt;And
1233
+ now I realize that the best way to improve my skills is to read the code of
1234
+ programmers who are much more advanced than I am. &lt;/p&gt;\\n\\n&lt;p&gt;So
1235
+ I ask, what are some of the best ruby code that you have ever seen?&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1236
+ SC_ON --&gt;\", \"selftext\": \"I was going through github, and I came across
1237
+ a simple tictactoe program. It surprised me how clever the programmer was
1238
+ with blocks and yields and such. I wrote a tictactoe program myself months
1239
+ ago when I was learning Ruby, and when I compare the two, my code is very
1240
+ clunky and not at all as elegant as this programmer. \\n \\nAnd now I
1241
+ realize that the best way to improve my skills is to read the code of programmers
1242
+ who are much more advanced than I am. \\n \\nSo I ask, what are some of
1243
+ the best ruby code that you have ever seen?\", \"likes\": null, \"secure_media\":
1244
+ null, \"link_flair_text\": null, \"id\": \"1mwg7o\", \"secure_media_embed\":
1245
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"hopengrind\", \"media\":
1246
+ null, \"score\": 55, \"approved_by\": null, \"over_18\": false, \"hidden\":
1247
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1248
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1249
+ 10, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1mwg7o/what_are_some_of_the_best_ruby_programs_youve/\",
1250
+ \"name\": \"t3_1mwg7o\", \"created\": 1379872130.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1mwg7o/what_are_some_of_the_best_ruby_programs_youve/\",
1251
+ \"author_flair_text\": null, \"title\": \"What are some of the best ruby programs
1252
+ you've ever seen?\", \"created_utc\": 1379868530.0, \"ups\": 65, \"num_comments\":
1253
+ 25, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1254
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1255
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1256
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;m learning ruby
1257
+ now and looking forward to finding a job doing front end and app development.
1258
+ \ Thanks!&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON --&gt;\", \"selftext\": \"I'm
1259
+ learning ruby now and looking forward to finding a job doing front end and
1260
+ app development. Thanks!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
1261
+ null, \"id\": \"1kylfv\", \"secure_media_embed\": {}, \"clicked\": false,
1262
+ \"stickied\": false, \"author\": \"codemonkei\", \"media\": null, \"score\":
1263
+ 26, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
1264
+ \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": 1377394522.0, \"link_flair_css_class\":
1265
+ null, \"author_flair_css_class\": null, \"downs\": 8, \"saved\": false, \"is_self\":
1266
+ true, \"permalink\": \"/r/ruby/comments/1kylfv/what_are_some_good_projects_to_do_with_ruby_to/\",
1267
+ \"name\": \"t3_1kylfv\", \"created\": 1377289503.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1kylfv/what_are_some_good_projects_to_do_with_ruby_to/\",
1268
+ \"author_flair_text\": null, \"title\": \"What are some good projects to do
1269
+ with Ruby to impress employers?\", \"created_utc\": 1377285903.0, \"ups\":
1270
+ 34, \"num_comments\": 43, \"visited\": false, \"num_reports\": null, \"distinguished\":
1271
+ null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\":
1272
+ null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1273
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Even I have just only few
1274
+ experiences of Ruby, I just become aware of there &lt;em&gt;is&lt;/em&gt;
1275
+ &lt;code&gt;for&lt;/code&gt; in Ruby (I saw that when I learned Ruby first).
1276
+ \ Most of Ruby codes seem to use just &lt;code&gt;Enumerable#each&lt;/code&gt;
1277
+ method instead of &lt;code&gt;for&lt;/code&gt; statement, but why? Is there
1278
+ any reason to prefer &lt;code&gt;Enumerable#each&lt;/code&gt; method over
1279
+ &lt;code&gt;for&lt;/code&gt; statement?&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON
1280
+ --&gt;\", \"selftext\": \"Even I have just only few experiences of Ruby, I
1281
+ just become aware of there *is* `for` in Ruby (I saw that when I learned Ruby
1282
+ first). Most of Ruby codes seem to use just `Enumerable#each` method instead
1283
+ of `for` statement, but why? Is there any reason to prefer `Enumerable#each`
1284
+ method over `for` statement?\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
1285
+ null, \"id\": \"p1l8k\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\":
1286
+ false, \"author\": \"hongminhee\", \"media\": null, \"score\": 27, \"approved_by\":
1287
+ null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
1288
+ \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
1289
+ null, \"downs\": 4, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/p1l8k/why_is_there_forstatement_in_ruby/\",
1290
+ \"name\": \"t3_p1l8k\", \"created\": 1327833555.0, \"url\": \"http://www.reddit.com/r/ruby/comments/p1l8k/why_is_there_forstatement_in_ruby/\",
1291
+ \"author_flair_text\": null, \"title\": \"Why is there for-statement in Ruby?\",
1292
+ \"created_utc\": 1327833555.0, \"ups\": 31, \"num_comments\": 35, \"visited\":
1293
+ false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\": \"t3\",
1294
+ \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
1295
+ {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div
1296
+ class=\\\"md\\\"&gt;&lt;p&gt;The languages are often compared so I am hoping
1297
+ my knowledge of python will make learning ruby faster. Maybe the best method
1298
+ is just to read a ruby book and learn from scratch, I am not sure yet how
1299
+ similar they are. However if anyone has made the switch and knows what a good
1300
+ starting point would be or if there are resrouces geared toward switching
1301
+ I would apperciate the advice. Thanks.&lt;/p&gt;\\n\\n&lt;p&gt;Edit: I will
1302
+ be using ruby as a scripting language. Mosly maintaing and updating existing
1303
+ scripts that put together XML files used for input for other applications
1304
+ and things like file management and such. So if there are resrouces geared
1305
+ towards scripting rather than building ruby applications that would be helpful.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1306
+ SC_ON --&gt;\", \"selftext\": \"The languages are often compared so I am hoping
1307
+ my knowledge of python will make learning ruby faster. Maybe the best method
1308
+ is just to read a ruby book and learn from scratch, I am not sure yet how
1309
+ similar they are. However if anyone has made the switch and knows what a good
1310
+ starting point would be or if there are resrouces geared toward switching
1311
+ I would apperciate the advice. Thanks.\\n\\nEdit: I will be using ruby as
1312
+ a scripting language. Mosly maintaing and updating existing scripts that put
1313
+ together XML files used for input for other applications and things like
1314
+ file management and such. So if there are resrouces geared towards scripting
1315
+ rather than building ruby applications that would be helpful.\", \"likes\":
1316
+ null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"pgnbp\",
1317
+ \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
1318
+ \"f4hy\", \"media\": null, \"score\": 18, \"approved_by\": null, \"over_18\":
1319
+ false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
1320
+ \"edited\": true, \"link_flair_css_class\": null, \"author_flair_css_class\":
1321
+ null, \"downs\": 5, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/pgnbp/i_am_a_python_programmer_who_needs_to_learn_ruby/\",
1322
+ \"name\": \"t3_pgnbp\", \"created\": 1328729735.0, \"url\": \"http://www.reddit.com/r/ruby/comments/pgnbp/i_am_a_python_programmer_who_needs_to_learn_ruby/\",
1323
+ \"author_flair_text\": null, \"title\": \"I am a python programmer who needs
1324
+ to learn ruby. Any good resources or advice?\", \"created_utc\": 1328729735.0,
1325
+ \"ups\": 23, \"num_comments\": 55, \"visited\": false, \"num_reports\": null,
1326
+ \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\",
1327
+ \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\":
1328
+ \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I can&amp;#39;t
1329
+ d/l XCode due to my version of OSX. RVM install commands don&amp;#39;t seem
1330
+ to make sense within my terminal. Do I need git? &lt;/p&gt;\\n\\n&lt;p&gt;I
1331
+ would like to learn Ruby (then Rails) but so far I&amp;#39;m just frustrated.
1332
+ &lt;/p&gt;\\n\\n&lt;p&gt;Thank you for any help you guys can offer.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1333
+ SC_ON --&gt;\", \"selftext\": \"I can't d/l XCode due to my version of OSX.
1334
+ RVM install commands don't seem to make sense within my terminal. Do I need
1335
+ git? \\n\\nI would like to learn Ruby (then Rails) but so far I'm just frustrated.
1336
+ \\n\\nThank you for any help you guys can offer.\", \"likes\": null, \"secure_media\":
1337
+ null, \"link_flair_text\": null, \"id\": \"rpwze\", \"secure_media_embed\":
1338
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"BeauBeauBeau\",
1339
+ \"media\": null, \"score\": 16, \"approved_by\": null, \"over_18\": false,
1340
+ \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\":
1341
+ false, \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1342
+ 5, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/rpwze/installing_ruby_wo_xcode_on_a_mac_or_why_is/\",
1343
+ \"name\": \"t3_rpwze\", \"created\": 1333397680.0, \"url\": \"http://www.reddit.com/r/ruby/comments/rpwze/installing_ruby_wo_xcode_on_a_mac_or_why_is/\",
1344
+ \"author_flair_text\": null, \"title\": \"Installing Ruby w/o XCode on a Mac:
1345
+ or why is installing Ruby such a pain in the ass? [NOOB] \", \"created_utc\":
1346
+ 1333394080.0, \"ups\": 21, \"num_comments\": 53, \"visited\": false, \"num_reports\":
1347
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1348
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1349
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;m
1350
+ going through the Ruby Koans right now as part of trying to learn Ruby. I
1351
+ just finished the about_blocks koan and I really just don&amp;#39;t understand
1352
+ how the &lt;code&gt;yield&lt;/code&gt; keyword works. Example code from the
1353
+ koan:&lt;/p&gt;\\n\\n&lt;pre&gt;&lt;code&gt;def many_yields\\n yield(:peanut)\\n
1354
+ \ yield(:butter)\\n yield(:and)\\n yield(:jelly)\\nend\\n\\ndef test_methods_can_call_yield_many_times\\n
1355
+ \ result = []\\n many_yields { |item| result &amp;lt;&amp;lt; item }\\n assert_equal
1356
+ [:peanut, :butter, :and, :jelly], result\\nend\\n&lt;/code&gt;&lt;/pre&gt;\\n\\n&lt;p&gt;I
1357
+ can see that &lt;code&gt;result&lt;/code&gt; is getting all four yielded values
1358
+ from &lt;code&gt;many_yields&lt;/code&gt;, but I don&amp;#39;t really understand
1359
+ what&amp;#39;s going on. I especially don&amp;#39;t understand the cases where
1360
+ yield is called without any values. Can somebody explain this keyword to me?&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1361
+ SC_ON --&gt;\", \"selftext\": \"I'm going through the Ruby Koans right now
1362
+ as part of trying to learn Ruby. I just finished the about_blocks koan and
1363
+ I really just don't understand how the `yield` keyword works. Example code
1364
+ from the koan:\\n\\n def many_yields\\n yield(:peanut)\\n yield(:butter)\\n
1365
+ \ yield(:and)\\n yield(:jelly)\\n end\\n\\n def test_methods_can_call_yield_many_times\\n
1366
+ \ result = []\\n many_yields { |item| result &lt;&lt; item }\\n assert_equal
1367
+ [:peanut, :butter, :and, :jelly], result\\n end\\n\\nI can see that `result`
1368
+ is getting all four yielded values from `many_yields`, but I don't really
1369
+ understand what's going on. I especially don't understand the cases where
1370
+ yield is called without any values. Can somebody explain this keyword to me?\",
1371
+ \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
1372
+ \"kvjrw\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false,
1373
+ \"author\": \"glenbolake\", \"media\": null, \"score\": 44, \"approved_by\":
1374
+ null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
1375
+ \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
1376
+ null, \"downs\": 1, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/kvjrw/ruby_newbie_i_dont_understand_yield/\",
1377
+ \"name\": \"t3_kvjrw\", \"created\": 1317324898.0, \"url\": \"http://www.reddit.com/r/ruby/comments/kvjrw/ruby_newbie_i_dont_understand_yield/\",
1378
+ \"author_flair_text\": null, \"title\": \"Ruby newbie - I don't understand
1379
+ yield\", \"created_utc\": 1317321298.0, \"ups\": 45, \"num_comments\": 36,
1380
+ \"visited\": false, \"num_reports\": null, \"distinguished\": null}}, {\"kind\":
1381
+ \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null, \"media_embed\":
1382
+ {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div
1383
+ class=\\\"md\\\"&gt;&lt;p&gt;I fundamentally do not understand the perspective
1384
+ many Rubyists have. I am not saying it anything is bad, I am saying &lt;em&gt;I
1385
+ do not understand&lt;/em&gt;. I just have a different perspective. I don&amp;#39;t
1386
+ understand why pragmatic people who don&amp;#39;t seem to be early adopters
1387
+ are leaving a good tool for tools that should only appeal to early adopters.&lt;/p&gt;\\n\\n&lt;p&gt;Please,
1388
+ let me explain my perspective. I have been working primarily with C++ the
1389
+ past 15, during that time I have dabbled with Java, PHP, Lua, Perl, Pascal,
1390
+ HTML/CSS, a couple kinds of assembly, C#/VB, others I wish I could forget
1391
+ and of course plain old C. I keep going back to C++ because I have a strong
1392
+ proficiency with it. I have the feeling I can make it do anything. I have
1393
+ made it solve some interesting problems. There are other reasons too, but
1394
+ this seems like enough to convey where I am coming from. I invested real time
1395
+ and effort gaining that proficiency, so I will use C++ when practical an invest
1396
+ more time learning something else when C++ is not practical.&lt;/p&gt;\\n\\n&lt;p&gt;I
1397
+ see a ton of Rubyists talking about Elixir and Node.js as somekind of wholesale
1398
+ replacement for Ruby. I understand that the two newer systems provide interesting
1399
+ interactions with threading systems. That does not seem like a reason to dump
1400
+ a whole language, a language with multiple independent healthy implementations
1401
+ (jRuby, Rubunius, Maglev, etc...), particularly when some of them have fixed
1402
+ threading performance. &lt;/p&gt;\\n\\n&lt;p&gt;Or maybe I am missing the
1403
+ point, maybe this is just about jumping to some popular new toy now that us
1404
+ old fogeys are onto Ruby? Of course not, all the people I read about in blogs
1405
+ and watch in talks at the countless Ruby conferences seem like pragmatic people
1406
+ interested in getting stuff done. Ruby seems like an excellent tool for getting
1407
+ stuff done. It is extremely easy to express complex ideas quickly. It has
1408
+ an excellent system for handling libraries. It has access to awesome performance
1409
+ via its C-API. If C is not your thing, It is mature enough that it is getting
1410
+ performance optimizations with every new release (of MRI/Yarv at least). These
1411
+ people invested significant time and effort learning Ruby, will their pragmatism
1412
+ just let them throw that away?&lt;/p&gt;\\n\\n&lt;p&gt;Perhaps my perspective
1413
+ is wrong and no-one is leaving Ruby? But it seems every other conference talk
1414
+ someone mentions Elixir while spitting Ruby&amp;#39;s name.&lt;/p&gt;\\n\\n&lt;p&gt;Perhaps,
1415
+ There is something to Elixir/Node I have completely missed? I read their docs
1416
+ and perused their libraries. They are missing features (and sometimes stability)
1417
+ like tools only a few years old would.&lt;/p&gt;\\n\\n&lt;p&gt;Why leave Ruby?&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1418
+ SC_ON --&gt;\", \"selftext\": \"I fundamentally do not understand the perspective
1419
+ many Rubyists have. I am not saying it anything is bad, I am saying *I do
1420
+ not understand*. I just have a different perspective. I don't understand why
1421
+ pragmatic people who don't seem to be early adopters are leaving a good tool
1422
+ for tools that should only appeal to early adopters.\\n\\nPlease, let me explain
1423
+ my perspective. I have been working primarily with C++ the past 15, during
1424
+ that time I have dabbled with Java, PHP, Lua, Perl, Pascal, HTML/CSS, a couple
1425
+ kinds of assembly, C#/VB, others I wish I could forget and of course plain
1426
+ old C. I keep going back to C++ because I have a strong proficiency with it.
1427
+ I have the feeling I can make it do anything. I have made it solve some interesting
1428
+ problems. There are other reasons too, but this seems like enough to convey
1429
+ where I am coming from. I invested real time and effort gaining that proficiency,
1430
+ so I will use C++ when practical an invest more time learning something else
1431
+ when C++ is not practical.\\n\\nI see a ton of Rubyists talking about Elixir
1432
+ and Node.js as somekind of wholesale replacement for Ruby. I understand that
1433
+ the two newer systems provide interesting interactions with threading systems.
1434
+ That does not seem like a reason to dump a whole language, a language with
1435
+ multiple independent healthy implementations (jRuby, Rubunius, Maglev, etc...),
1436
+ particularly when some of them have fixed threading performance. \\n\\nOr
1437
+ maybe I am missing the point, maybe this is just about jumping to some popular
1438
+ new toy now that us old fogeys are onto Ruby? Of course not, all the people
1439
+ I read about in blogs and watch in talks at the countless Ruby conferences
1440
+ seem like pragmatic people interested in getting stuff done. Ruby seems like
1441
+ an excellent tool for getting stuff done. It is extremely easy to express
1442
+ complex ideas quickly. It has an excellent system for handling libraries.
1443
+ It has access to awesome performance via its C-API. If C is not your thing,
1444
+ It is mature enough that it is getting performance optimizations with every
1445
+ new release (of MRI/Yarv at least). These people invested significant time
1446
+ and effort learning Ruby, will their pragmatism just let them throw that away?\\n\\nPerhaps
1447
+ my perspective is wrong and no-one is leaving Ruby? But it seems every other
1448
+ conference talk someone mentions Elixir while spitting Ruby's name.\\n\\nPerhaps,
1449
+ There is something to Elixir/Node I have completely missed? I read their docs
1450
+ and perused their libraries. They are missing features (and sometimes stability)
1451
+ like tools only a few years old would.\\n\\nWhy leave Ruby?\", \"likes\":
1452
+ null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"1o6srn\",
1453
+ \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
1454
+ \"Sqeaky\", \"media\": null, \"score\": 39, \"approved_by\": null, \"over_18\":
1455
+ false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
1456
+ \"edited\": false, \"link_flair_css_class\": null, \"author_flair_css_class\":
1457
+ null, \"downs\": 12, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1o6srn/why_elixir_why_nodejs_coming_from_c_ruby_seems/\",
1458
+ \"name\": \"t3_1o6srn\", \"created\": 1381457829.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1o6srn/why_elixir_why_nodejs_coming_from_c_ruby_seems/\",
1459
+ \"author_flair_text\": null, \"title\": \"Why Elixir? Why Node.js? Coming
1460
+ from C++, Ruby seems like a fine language.\", \"created_utc\": 1381454229.0,
1461
+ \"ups\": 51, \"num_comments\": 46, \"visited\": false, \"num_reports\": null,
1462
+ \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\",
1463
+ \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\":
1464
+ \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I would really
1465
+ like to start a study group for Ruby on Rails for this book &lt;a href=\\\"http://ruby.railstutorial.org/ruby-on-rails-tutorial-book\\\"&gt;http://ruby.railstutorial.org/ruby-on-rails-tutorial-book&lt;/a&gt;
1466
+ (if you have better suggestions please let me know) I have just finished the
1467
+ CodeCademy course for Ruby so I think I have a decent grasp on the Ruby language.
1468
+ It would be nice if we could have a couple people who are experienced with
1469
+ Rails help guide us through. I plan on hosting it on my website under the
1470
+ Ruby on Rails subforum so we can keep all our stuff uncluttered, my website
1471
+ is called milesftp.com(sorry for the odd name my friend had the domain registered
1472
+ and so we decided to use it for now). If you guys are interested please let
1473
+ me know and we will figure something&amp;#39;s out! Thanks. &lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1474
+ SC_ON --&gt;\", \"selftext\": \"I would really like to start a study group
1475
+ for Ruby on Rails for this book http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
1476
+ (if you have better suggestions please let me know) I have just finished the
1477
+ CodeCademy course for Ruby so I think I have a decent grasp on the Ruby language.
1478
+ It would be nice if we could have a couple people who are experienced with
1479
+ Rails help guide us through. I plan on hosting it on my website under the
1480
+ Ruby on Rails subforum so we can keep all our stuff uncluttered, my website
1481
+ is called milesftp.com(sorry for the odd name my friend had the domain registered
1482
+ and so we decided to use it for now). If you guys are interested please let
1483
+ me know and we will figure something's out! Thanks. \", \"likes\": null, \"secure_media\":
1484
+ null, \"link_flair_text\": null, \"id\": \"1n9e40\", \"secure_media_embed\":
1485
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"valorvision\",
1486
+ \"media\": null, \"score\": 22, \"approved_by\": null, \"over_18\": false,
1487
+ \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\":
1488
+ false, \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1489
+ 8, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1n9e40/creating_a_ruby_on_rails_study_group_please_let/\",
1490
+ \"name\": \"t3_1n9e40\", \"created\": 1380306666.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1n9e40/creating_a_ruby_on_rails_study_group_please_let/\",
1491
+ \"author_flair_text\": null, \"title\": \"Creating A Ruby on Rails Study Group,
1492
+ please let me know if you're interested.\", \"created_utc\": 1380303066.0,
1493
+ \"ups\": 30, \"num_comments\": 40, \"visited\": false, \"num_reports\": null,
1494
+ \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\",
1495
+ \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\":
1496
+ \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Hi there,&lt;/p&gt;\\n\\n&lt;p&gt;I
1497
+ started learning Ruby a few months ago and I bought myself a Microsoft Kinect
1498
+ Cam as an early X-Mas gift. Of course I&amp;#39;m using Linux (yes your OS-X
1499
+ is fine too) and don&amp;#39;t even own an X-Box 360 ... so I started the
1500
+ hacking.&lt;/p&gt;\\n\\n&lt;p&gt;After a short time of fiddling with C, I
1501
+ remembered how much it tends to get on my nerves and how much I love Ruby,
1502
+ so I thought &amp;quot;&lt;strong&gt;Why not write some Kinect stuff with
1503
+ Ruby?!&lt;/strong&gt;&amp;quot;. After a bit of googling I found exactly no
1504
+ other projects except&lt;/p&gt;\\n\\n&lt;p&gt;---- &lt;a href=\\\"http://openkinect.org/wiki/Ruby_Wrapper#Sample_Code\\\"&gt;this
1505
+ one&lt;/a&gt; ----&lt;/p&gt;\\n\\n&lt;p&gt;which was empty and so I decided
1506
+ to &lt;strong&gt;post my first code snippet there&lt;/strong&gt;.&lt;/p&gt;\\n\\n&lt;p&gt;Sadly
1507
+ nobody reacted so I have to assume that this project is dead. But what about
1508
+ you? &lt;em&gt;Anyone interested in bringing some of the Kinect functionality
1509
+ to Ruby?&lt;/em&gt;&lt;/p&gt;\\n\\n&lt;p&gt;&lt;strong&gt;What &lt;del&gt;I&lt;/del&gt;
1510
+ we managed to do:&lt;/strong&gt;&lt;/p&gt;\\n\\n&lt;ul&gt;\\n&lt;li&gt;Control
1511
+ the Kinects motor&lt;/li&gt;\\n&lt;li&gt;Control the Kinects LED&lt;/li&gt;\\n&lt;li&gt;Get
1512
+ accelerometer data&lt;/li&gt;\\n&lt;/ul&gt;\\n\\n&lt;p&gt;&lt;strong&gt;What
1513
+ is missing (tried but failed):&lt;/strong&gt;&lt;/p&gt;\\n\\n&lt;ul&gt;\\n&lt;li&gt;Get
1514
+ an image from the RGB cam&lt;/li&gt;\\n&lt;li&gt;Get an image from the depth
1515
+ cam&lt;/li&gt;\\n&lt;li&gt;&lt;del&gt;Get accelerometer data&lt;/del&gt;&lt;/li&gt;\\n&lt;/ul&gt;\\n\\n&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;
1516
+ Started to develop a pure Ruby Kinect driver. Who wants to help?&lt;/p&gt;\\n\\n&lt;p&gt;PS:
1517
+ I&amp;#39;m not interested in libfreenect wrappers, I want to create a pure
1518
+ Ruby driver. (only with libusb i.e.)&lt;/p&gt;\\n\\n&lt;p&gt;&lt;strong&gt;EDIT:
1519
+ I&amp;#39;ve put what I got so far on GitHub: &lt;a href=\\\"https://github.com/pachacamac/rinect\\\"&gt;see
1520
+ here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON --&gt;\",
1521
+ \"selftext\": \"Hi there,\\n\\nI started learning Ruby a few months ago and
1522
+ I bought myself a Microsoft Kinect Cam as an early X-Mas gift. Of course I'm
1523
+ using Linux (yes your OS-X is fine too) and don't even own an X-Box 360 ...
1524
+ so I started the hacking.\\n\\nAfter a short time of fiddling with C, I remembered
1525
+ how much it tends to get on my nerves and how much I love Ruby, so I thought
1526
+ \\\"**Why not write some Kinect stuff with Ruby?!**\\\". After a bit of googling
1527
+ I found exactly no other projects except\\n\\n---- [this one](http://openkinect.org/wiki/Ruby_Wrapper#Sample_Code)
1528
+ ----\\n\\nwhich was empty and so I decided to **post my first code snippet
1529
+ there**.\\n\\nSadly nobody reacted so I have to assume that this project is
1530
+ dead. But what about you? *Anyone interested in bringing some of the Kinect
1531
+ functionality to Ruby?*\\n\\n\\n**What ~~I~~ we managed to do:**\\n\\n * Control
1532
+ the Kinects motor\\n * Control the Kinects LED\\n * Get accelerometer data\\n\\n**What
1533
+ is missing (tried but failed):**\\n\\n * Get an image from the RGB cam\\n
1534
+ * Get an image from the depth cam\\n * ~~Get accelerometer data~~\\n\\n\\n\\n**TL;DR:**
1535
+ Started to develop a pure Ruby Kinect driver. Who wants to help?\\n\\nPS:
1536
+ I'm not interested in libfreenect wrappers, I want to create a pure Ruby driver.
1537
+ (only with libusb i.e.)\\n\\n\\n**EDIT: I've put what I got so far on GitHub:
1538
+ [see here](https://github.com/pachacamac/rinect)**\", \"likes\": null, \"secure_media\":
1539
+ null, \"link_flair_text\": null, \"id\": \"euka7\", \"secure_media_embed\":
1540
+ {}, \"clicked\": false, \"stickied\": false, \"author\": \"nexe\", \"media\":
1541
+ null, \"score\": 27, \"approved_by\": null, \"over_18\": false, \"hidden\":
1542
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": true,
1543
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1544
+ 8, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/euka7/ruby_kinect_project/\",
1545
+ \"name\": \"t3_euka7\", \"created\": 1293897993.0, \"url\": \"http://www.reddit.com/r/ruby/comments/euka7/ruby_kinect_project/\",
1546
+ \"author_flair_text\": null, \"title\": \"Ruby Kinect Project\", \"created_utc\":
1547
+ 1293897993.0, \"ups\": 35, \"num_comments\": 36, \"visited\": false, \"num_reports\":
1548
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1549
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1550
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Dynamic
1551
+ getters and setters in Perl:&lt;/p&gt;\\n\\n&lt;pre&gt;&lt;code&gt;sub AUTOLOAD
1552
+ {\\n my @elements = qw(color age weight height);\\n\\n our $AUTOLOAD;\\n
1553
+ \ if ($AUTOLOAD =~ /::(\\\\w+)$/ and grep $1 eq $_, @elements) {\\n my
1554
+ $field = ucfirst $1;\\n {\\n no strict &amp;#39;refs&amp;#39;;\\n
1555
+ \ *{$AUTOLOAD} = sub { $_[0]-&amp;gt;{$field} };\\n }\\n goto &amp;amp;{$AUTOLOAD};\\n
1556
+ \ } elsif ($AUTOLOAD =~ /::set_(\\\\w+)$/ and grep $1 eq $_, @elements) {\\n
1557
+ \ my $field = ucfirst $1;\\n {\\n no strict &amp;#39;refs&amp;#39;;\\n
1558
+ \ *{$AUTOLOAD} = sub { $_[0]-&amp;gt;{$field} = $_[1] };\\n }\\n goto
1559
+ &amp;amp;{$AUTOLOAD};\\n } else {\\n croak &amp;quot;$_[0] does not understand
1560
+ this method\\\\n&amp;quot;;\\n }\\n}\\n&lt;/code&gt;&lt;/pre&gt;\\n\\n&lt;p&gt;In
1561
+ Ruby:&lt;/p&gt;\\n\\n&lt;pre&gt;&lt;code&gt;attr_accessor :color, :age, :weight,
1562
+ :height\\n&lt;/code&gt;&lt;/pre&gt;\\n\\n&lt;p&gt;Yeah.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1563
+ SC_ON --&gt;\", \"selftext\": \"Dynamic getters and setters in Perl:\\n\\n
1564
+ \ sub AUTOLOAD {\\n my @elements = qw(color age weight height);\\n
1565
+ \ \\n our $AUTOLOAD;\\n if ($AUTOLOAD =~ /::(\\\\w+)$/ and grep
1566
+ $1 eq $_, @elements) {\\n my $field = ucfirst $1;\\n {\\n no
1567
+ strict 'refs';\\n *{$AUTOLOAD} = sub { $_[0]-&gt;{$field} };\\n }\\n
1568
+ \ goto &amp;{$AUTOLOAD};\\n } elsif ($AUTOLOAD =~ /::set_(\\\\w+)$/
1569
+ and grep $1 eq $_, @elements) {\\n my $field = ucfirst $1;\\n {\\n
1570
+ \ no strict 'refs';\\n *{$AUTOLOAD} = sub { $_[0]-&gt;{$field}
1571
+ = $_[1] };\\n }\\n goto &amp;{$AUTOLOAD};\\n } else {\\n
1572
+ \ croak \\\"$_[0] does not understand this method\\\\n\\\";\\n }\\n
1573
+ \ }\\n\\nIn Ruby:\\n\\n attr_accessor :color, :age, :weight, :height\\n\\nYeah.\",
1574
+ \"likes\": null, \"secure_media\": null, \"link_flair_text\": null, \"id\":
1575
+ \"e4upb\", \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false,
1576
+ \"author\": \"Perceptes\", \"media\": null, \"score\": 33, \"approved_by\":
1577
+ null, \"over_18\": false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\":
1578
+ \"t5_2qh21\", \"edited\": true, \"link_flair_css_class\": null, \"author_flair_css_class\":
1579
+ null, \"downs\": 12, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/e4upb/learning_perl_is_making_me_appreciate_ruby_even/\",
1580
+ \"name\": \"t3_e4upb\", \"created\": 1289518955.0, \"url\": \"http://www.reddit.com/r/ruby/comments/e4upb/learning_perl_is_making_me_appreciate_ruby_even/\",
1581
+ \"author_flair_text\": null, \"title\": \"Learning Perl is making me appreciate
1582
+ Ruby even more\", \"created_utc\": 1289518955.0, \"ups\": 45, \"num_comments\":
1583
+ 44, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1584
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1585
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1586
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Hey &lt;a href=\\\"/r/ruby\\\"&gt;/r/ruby&lt;/a&gt;,&lt;/p&gt;\\n\\n&lt;p&gt;Lately
1587
+ Ive been getting my hands in a lot of languages to get a feel for them. Trying
1588
+ out JS/WinJS, Ruby (+Some Rails), and Python.&lt;/p&gt;\\n\\n&lt;p&gt;Ive
1589
+ worked with Python for a bit now, however I have never taken the time to learn
1590
+ from the ground-up any language ( outside of HTML/CSS(+SASS) ). As such lately
1591
+ Ive been doing some rather simple exploration of Ruby vs Python, jumping between
1592
+ the two trying to get a feel for it. Both seem great, however I am leaning
1593
+ toward Ruby currently, and wanted to see if anyone had some input.&lt;/p&gt;\\n\\n&lt;p&gt;A
1594
+ few concerns I have with Ruby is that while there is a TON of Ruby intro material
1595
+ (Learn Ruby the Hard Way, RubyMonk, and Pragmatic Guide), everything project
1596
+ development wise and even gem wise is Rails centric. I understand Rails is
1597
+ popular but even a simple Sinatra app, I cant find a Mailer Gem that doesn&amp;#39;t
1598
+ require Rails. While on the Python end, I fell in love with Hyde but it like
1599
+ many other projects I found for Python are completely dead development wise.&lt;/p&gt;\\n\\n&lt;p&gt;Any
1600
+ links or input on what I should be looking at to make a good decision?&lt;/p&gt;\\n\\n&lt;p&gt;Note:
1601
+ Apologies if this is asked a lot, or shouldnt be asked here. I tried a search
1602
+ and most of the questions were a year old.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1603
+ SC_ON --&gt;\", \"selftext\": \"Hey /r/ruby,\\n\\nLately Ive been getting
1604
+ my hands in a lot of languages to get a feel for them. Trying out JS/WinJS,
1605
+ Ruby (+Some Rails), and Python.\\n\\nIve worked with Python for a bit now,
1606
+ however I have never taken the time to learn from the ground-up any language
1607
+ ( outside of HTML/CSS(+SASS) ). As such lately Ive been doing some rather
1608
+ simple exploration of Ruby vs Python, jumping between the two trying to get
1609
+ a feel for it. Both seem great, however I am leaning toward Ruby currently,
1610
+ and wanted to see if anyone had some input.\\n\\nA few concerns I have with
1611
+ Ruby is that while there is a TON of Ruby intro material (Learn Ruby the Hard
1612
+ Way, RubyMonk, and Pragmatic Guide), everything project development wise and
1613
+ even gem wise is Rails centric. I understand Rails is popular but even a simple
1614
+ Sinatra app, I cant find a Mailer Gem that doesn't require Rails. While on
1615
+ the Python end, I fell in love with Hyde but it like many other projects I
1616
+ found for Python are completely dead development wise.\\n\\nAny links or input
1617
+ on what I should be looking at to make a good decision?\\n\\nNote: Apologies
1618
+ if this is asked a lot, or shouldnt be asked here. I tried a search and most
1619
+ of the questions were a year old.\", \"likes\": null, \"secure_media\": null,
1620
+ \"link_flair_text\": null, \"id\": \"zyzf7\", \"secure_media_embed\": {},
1621
+ \"clicked\": false, \"stickied\": false, \"author\": \"RevisionZero\", \"media\":
1622
+ null, \"score\": 7, \"approved_by\": null, \"over_18\": false, \"hidden\":
1623
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1624
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1625
+ 3, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/zyzf7/looking_for_some_advice_should_i_focus_on/\",
1626
+ \"name\": \"t3_zyzf7\", \"created\": 1347809223.0, \"url\": \"http://www.reddit.com/r/ruby/comments/zyzf7/looking_for_some_advice_should_i_focus_on/\",
1627
+ \"author_flair_text\": null, \"title\": \"Looking for some advice: Should
1628
+ I focus on learning Python or Ruby? Input much appreciated.\", \"created_utc\":
1629
+ 1347805623.0, \"ups\": 10, \"num_comments\": 56, \"visited\": false, \"num_reports\":
1630
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1631
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1632
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;Hey
1633
+ everyone, do you guys mind sharing what are good open source projects for
1634
+ Ruby beginners? &lt;/p&gt;\\n\\n&lt;p&gt;Thanks for the help in advance!&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1635
+ SC_ON --&gt;\", \"selftext\": \"Hey everyone, do you guys mind sharing what
1636
+ are good open source projects for Ruby beginners? \\n\\nThanks for the help
1637
+ in advance!\", \"likes\": null, \"secure_media\": null, \"link_flair_text\":
1638
+ null, \"id\": \"18abdk\", \"secure_media_embed\": {}, \"clicked\": false,
1639
+ \"stickied\": false, \"author\": \"ghostwarfare\", \"media\": null, \"score\":
1640
+ 42, \"approved_by\": null, \"over_18\": false, \"hidden\": false, \"thumbnail\":
1641
+ \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false, \"link_flair_css_class\":
1642
+ null, \"author_flair_css_class\": null, \"downs\": 4, \"saved\": false, \"is_self\":
1643
+ true, \"permalink\": \"/r/ruby/comments/18abdk/what_are_some_good_open_source_projects_for_ruby/\",
1644
+ \"name\": \"t3_18abdk\", \"created\": 1360552623.0, \"url\": \"http://www.reddit.com/r/ruby/comments/18abdk/what_are_some_good_open_source_projects_for_ruby/\",
1645
+ \"author_flair_text\": null, \"title\": \"What are some good open source projects
1646
+ for Ruby beginners?\", \"created_utc\": 1360552623.0, \"ups\": 46, \"num_comments\":
1647
+ 22, \"visited\": false, \"num_reports\": null, \"distinguished\": null}},
1648
+ {\"kind\": \"t3\", \"data\": {\"domain\": \"self.ruby\", \"banned_by\": null,
1649
+ \"media_embed\": {}, \"subreddit\": \"ruby\", \"selftext_html\": \"&lt;!--
1650
+ SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I wanted to get a reality
1651
+ check from the ruby community before I dig myself any deeper into a hole.&lt;/p&gt;\\n\\n&lt;p&gt;A
1652
+ little bit of history first.&lt;/p&gt;\\n\\n&lt;p&gt;I am a 32 year old with
1653
+ no college education. I currently work at a dead end job in a warehouse putting
1654
+ away boxes and making deliveries. I have always loved computers and have been
1655
+ making websites for friends and family for years. I never charged, I just
1656
+ did it for the challenge and to learn something new. About 6 months ago I
1657
+ a friend turned me on to Reddit and shortly after I discovered r/webdev. At
1658
+ the time I was messing around with PHP and Wordpress and had never heard of
1659
+ Ruby or Python. After a few weeks of hanging around on r/webdev I discovered
1660
+ Ruby and the Rails framework. I dived in and have been trying to teach myself
1661
+ Ruby and Rails.&lt;/p&gt;\\n\\n&lt;p&gt;Up until a few months ago I had been
1662
+ a little depressed where my life had ended up. When I found Ruby I thought
1663
+ maybe there might be a chance turn my hobby into a career. Currently I am
1664
+ on my second read through of Eloquent Ruby and have done the the Ruby tutorial.
1665
+ I practice and study every day. I try to come up with small projects to work
1666
+ on to try the new concepts I learn and to heIp me retain the what I read.
1667
+ I have been considering signing up for one of the many Rails dev camps to
1668
+ help accelerate my path into the industry.&lt;/p&gt;\\n\\n&lt;p&gt;My fear
1669
+ is that I&amp;#39;ll never be taken seriously when I finally apply for a job.
1670
+ Mainly because I have no programing experience and I don&amp;#39;t have a
1671
+ CS degree.&lt;/p&gt;\\n\\n&lt;p&gt;So tell me r/ruby... can I make this a
1672
+ reality? &lt;/p&gt;\\n\\n&lt;p&gt;I&amp;#39;m not trying to become the next
1673
+ Zuckerberg or create the next Instagram. I just want a career where I love
1674
+ what I do and I have an opportunity to make a small difference in the world.&lt;/p&gt;\\n\\n&lt;p&gt;TLDR;
1675
+ I&amp;#39;m 32 no college eduction and I want to be a Ruby/Rails dev. Do I
1676
+ have a chance? Give it to me straight.&lt;/p&gt;\\n&lt;/div&gt;&lt;!-- SC_ON
1677
+ --&gt;\", \"selftext\": \"I wanted to get a reality check from the ruby community
1678
+ before I dig myself any deeper into a hole.\\n\\nA little bit of history first.\\n\\nI
1679
+ am a 32 year old with no college education. I currently work at a dead end
1680
+ job in a warehouse putting away boxes and making deliveries. I have always
1681
+ loved computers and have been making websites for friends and family for years.
1682
+ I never charged, I just did it for the challenge and to learn something new.
1683
+ About 6 months ago I a friend turned me on to Reddit and shortly after I discovered
1684
+ r/webdev. At the time I was messing around with PHP and Wordpress and had
1685
+ never heard of Ruby or Python. After a few weeks of hanging around on r/webdev
1686
+ I discovered Ruby and the Rails framework. I dived in and have been trying
1687
+ to teach myself Ruby and Rails.\\n\\nUp until a few months ago I had been
1688
+ a little depressed where my life had ended up. When I found Ruby I thought
1689
+ maybe there might be a chance turn my hobby into a career. Currently I am
1690
+ on my second read through of Eloquent Ruby and have done the the Ruby tutorial.
1691
+ I practice and study every day. I try to come up with small projects to work
1692
+ on to try the new concepts I learn and to heIp me retain the what I read.
1693
+ I have been considering signing up for one of the many Rails dev camps to
1694
+ help accelerate my path into the industry.\\n\\nMy fear is that I'll never
1695
+ be taken seriously when I finally apply for a job. Mainly because I have no
1696
+ programing experience and I don't have a CS degree.\\n\\nSo tell me r/ruby...
1697
+ can I make this a reality? \\n\\nI'm not trying to become the next Zuckerberg
1698
+ or create the next Instagram. I just want a career where I love what I do
1699
+ and I have an opportunity to make a small difference in the world.\\n\\nTLDR;
1700
+ I'm 32 no college eduction and I want to be a Ruby/Rails dev. Do I have a
1701
+ chance? Give it to me straight.\", \"likes\": null, \"secure_media\": null,
1702
+ \"link_flair_text\": null, \"id\": \"1bjyc6\", \"secure_media_embed\": {},
1703
+ \"clicked\": false, \"stickied\": false, \"author\": \"ruby_reality\", \"media\":
1704
+ null, \"score\": 21, \"approved_by\": null, \"over_18\": false, \"hidden\":
1705
+ false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\", \"edited\": false,
1706
+ \"link_flair_css_class\": null, \"author_flair_css_class\": null, \"downs\":
1707
+ 10, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/1bjyc6/reality_check/\",
1708
+ \"name\": \"t3_1bjyc6\", \"created\": 1364952459.0, \"url\": \"http://www.reddit.com/r/ruby/comments/1bjyc6/reality_check/\",
1709
+ \"author_flair_text\": null, \"title\": \"Reality Check\", \"created_utc\":
1710
+ 1364948859.0, \"ups\": 31, \"num_comments\": 41, \"visited\": false, \"num_reports\":
1711
+ null, \"distinguished\": null}}, {\"kind\": \"t3\", \"data\": {\"domain\":
1712
+ \"self.ruby\", \"banned_by\": null, \"media_embed\": {}, \"subreddit\": \"ruby\",
1713
+ \"selftext_html\": \"&lt;!-- SC_OFF --&gt;&lt;div class=\\\"md\\\"&gt;&lt;p&gt;I&amp;#39;m
1714
+ just getting started with Ruby so please forgive the possibly noobish question.
1715
+ The webapp I&amp;#39;m trying to develop is currently based on sinatra and
1716
+ I&amp;#39;m not sure what the best way to implement secure login feature is.
1717
+ I&amp;#39;ve found this: &lt;a href=\\\"http://rubygems.org/gems/sinatra-security\\\"&gt;http://rubygems.org/gems/sinatra-security&lt;/a&gt;
1718
+ project which seems good but it isn&amp;#39;t listed on the &lt;a href=\\\"http://www.sinatrarb.com/extensions-wild.html\\\"&gt;official
1719
+ sinatra extensions site&lt;/a&gt; so I&amp;#39;m not sure if it&amp;#39;s
1720
+ legit. &lt;/p&gt;\\n\\n&lt;p&gt;There is a &lt;a href=\\\"http://www.sinatrarb.com/intro#Using%20Sessions\\\"&gt;sessions&lt;/a&gt;
1721
+ feature in sinatra but I don&amp;#39;t think this is any actual security.
1722
+ This is just maintaining a state. &lt;/p&gt;\\n\\n&lt;p&gt;I don&amp;#39;t
1723
+ need to maintain a state because the app is AJAX based so once a user is on
1724
+ a page all the rest happens in the background. The main concern is how can
1725
+ I securely transfer data between the client and the sinatra app without someone
1726
+ in the middle sniffing the data? And how can I ensure that only authorized
1727
+ users are able to pull data from the sinatra server?&lt;/p&gt;\\n\\n&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;
1728
+ Thanks &lt;a href=\\\"/r/Ruby\\\"&gt;/r/Ruby&lt;/a&gt;! It seems like &lt;a
1729
+ href=\\\"https://github.com/hassox/warden/wiki/overview\\\"&gt;Warden&lt;/a&gt;
1730
+ is the easiest solution and &lt;a href=\\\"http://railscasts.com/episodes/250-authentication-from-scratch\\\"&gt;this&lt;/a&gt;
1731
+ is a generally good way to learn about authentication in Ruby.&lt;/p&gt;\\n&lt;/div&gt;&lt;!--
1732
+ SC_ON --&gt;\", \"selftext\": \"I'm just getting started with Ruby so please
1733
+ forgive the possibly noobish question. The webapp I'm trying to develop is
1734
+ currently based on sinatra and I'm not sure what the best way to implement
1735
+ secure login feature is. I've found this: http://rubygems.org/gems/sinatra-security
1736
+ project which seems good but it isn't listed on the [official sinatra extensions
1737
+ site](http://www.sinatrarb.com/extensions-wild.html) so I'm not sure if it's
1738
+ legit. \\n\\nThere is a [sessions](http://www.sinatrarb.com/intro#Using%20Sessions)
1739
+ feature in sinatra but I don't think this is any actual security. This is
1740
+ just maintaining a state. \\n\\nI don't need to maintain a state because the
1741
+ app is AJAX based so once a user is on a page all the rest happens in the
1742
+ background. The main concern is how can I securely transfer data between the
1743
+ client and the sinatra app without someone in the middle sniffing the data?
1744
+ And how can I ensure that only authorized users are able to pull data from
1745
+ the sinatra server?\\n\\n**Edit:** Thanks /r/Ruby! It seems like [Warden](https://github.com/hassox/warden/wiki/overview)
1746
+ is the easiest solution and [this](http://railscasts.com/episodes/250-authentication-from-scratch)
1747
+ is a generally good way to learn about authentication in Ruby.\", \"likes\":
1748
+ null, \"secure_media\": null, \"link_flair_text\": null, \"id\": \"hjnkx\",
1749
+ \"secure_media_embed\": {}, \"clicked\": false, \"stickied\": false, \"author\":
1750
+ \"kutuzof\", \"media\": null, \"score\": 22, \"approved_by\": null, \"over_18\":
1751
+ false, \"hidden\": false, \"thumbnail\": \"\", \"subreddit_id\": \"t5_2qh21\",
1752
+ \"edited\": true, \"link_flair_css_class\": null, \"author_flair_css_class\":
1753
+ null, \"downs\": 1, \"saved\": false, \"is_self\": true, \"permalink\": \"/r/ruby/comments/hjnkx/hello_ruby_hackers_what_is_the_best_way_to/\",
1754
+ \"name\": \"t3_hjnkx\", \"created\": 1306318645.0, \"url\": \"http://www.reddit.com/r/ruby/comments/hjnkx/hello_ruby_hackers_what_is_the_best_way_to/\",
1755
+ \"author_flair_text\": null, \"title\": \"Hello Ruby Hackers, what is the
1756
+ best way to implement a secure login for a small web app?\", \"created_utc\":
1757
+ 1306315045.0, \"ups\": 23, \"num_comments\": 52, \"visited\": false, \"num_reports\":
1758
+ null, \"distinguished\": null}}], \"after\": \"t3_hjnkx\", \"before\": null}}"
1759
+ http_version:
1760
+ recorded_at: Wed, 08 Jan 2014 06:49:53 GMT
1761
+ recorded_with: VCR 2.8.0