tags.
+ # It also appends a \n to the end of every rendered output string. Since
+ # many of the things we're Markdowning are meant to be inline, the
+ # tags and \n are stripped out here, leaving the decision to the
+ # template(s).
+ self.render(str).strip[3...-4]
+ end
+ end
+end
diff --git a/public/.DS_Store b/public/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
Binary files a/public/.DS_Store and /dev/null differ
diff --git a/public/120 - iPhone.png b/public/120 - iPhone.png
deleted file mode 100644
index 282bb5d..0000000
Binary files a/public/120 - iPhone.png and /dev/null differ
diff --git a/public/background.png b/public/background.png
deleted file mode 100644
index 7d661ee..0000000
Binary files a/public/background.png and /dev/null differ
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index a3de566..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,123 +0,0 @@
-
devpunks \m/
-
-
-
-
devpunks \m/
-
-
-
The first technology show from junior to super senior developer in 15 minutes.
-
-
-
-
-
-
-
Devpunks include a diverse array of ideologies, fashions and forms of expression, including visual art, literature, and film. Devpunk are largely characterized by anti-establishment views and the promotion of individual freedom. The devpunk is centered on a loud, aggressive genre of developers. It is usually played by small teams consisting of a junior, one or two seniors, and a hiring manager.
-
-
-
- Politics
-
-
devpunk politics cover the entire political spectrum. devpunk-related ideologies are mostly concerned with individual freedom and anti-establishment views. Common devpunk viewpoints include anti-authoritarianism, a DIY ethic, non-conformity, direct action and not selling out.
-
-
-
- Community
-
-
devpunks can come from any and all walks of life and economic classes. Compared to some alternative cultures, devpunk is much closer to being gender equalist in terms of its ideology.
-
-
One part of devpunk is creating explicitly outward identities of mentality. Everything that was normally supposed to be hidden was brought to the front, both literally and figuratively.
-
-
-
- Devpunk Vodcast
-
-
Devpunks often follow a DIY policy of filming the footage first, without permission, and also posting it without permission, but will generally take down material if asked. Founder Joly MacFie argues that this serves an important archival purpose.
-
-
Devpunk Communities use collaborative podcasts & vocasts to support multiple contributors podcasting through generally simplified processes, and without having to host their own individual feeds. A community podcast can also allow members of the community (related to the podcast topic) to contribute to the podcast in many different ways. This method was first used for a series of podcasts hosted by the Regional Educational Technology Center at Fordham University in 2005.
-
-
-
- π» devpunks: βThis is the Show Titleβ
-
-
-
- @devpunks
- First Guest
-
-
-
-
-
-
-
-
- @JessiTron
-
-
-
-
-
-
- 30:00 minute viewing time
-
-
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
-
-
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
-
diff --git a/public/wallpaper.png b/public/wallpaper.png
deleted file mode 100644
index 8496291..0000000
Binary files a/public/wallpaper.png and /dev/null differ
diff --git a/spec/easy_data_spec.rb b/spec/easy_data_spec.rb
new file mode 100644
index 0000000..e6b7f39
--- /dev/null
+++ b/spec/easy_data_spec.rb
@@ -0,0 +1,58 @@
+require "./easy_data"
+
+# Terminology
+#
+# data hash:
+# a hash with at least one non-hash value
+#
+# data object:
+# has attributes that can be accessed using dot notation
+
+RSpec.describe "easy data" do
+ let(:caesar) do
+ {
+ name: "Caesar",
+ age: 40
+ }
+ end
+
+ def handle obj
+ DevPunks::EasyData.transform obj
+ end
+
+ it "turns data hashes into data objects" do
+ expect(handle caesar).to have_attributes caesar
+ end
+
+ it "leaves nested hashes as hashes" do
+ expect(handle(person: caesar)).to be_a Hash
+ end
+
+ it "parses markdown in string attributes" do
+ expect(
+ handle caesar.merge(
+ description: "inventor of *salad*"
+ )
+ ).to have_attributes description: "inventor of salad"
+ end
+
+ it "parses markdown in arrays of strings" do
+ expect(handle ["*foo*", "bar"]).to eq ["foo", "bar"]
+ end
+
+ it "splits multi para heredoc-style text (> in yaml) into arrays" do
+ expect(
+ handle caesar.merge(
+ history: "betrayed by his brother Cobb\ndied of high cholesterol"
+ )
+ ).to have_attributes history: ["betrayed by his brother Cobb", "died of high cholesterol"]
+ end
+
+ it "splits single para heredoc-style text (> in yaml) into arrays" do
+ expect(
+ handle caesar.merge(
+ history: "betrayed by his brother Cobb\n"
+ )
+ ).to have_attributes history: ["betrayed by his brother Cobb"]
+ end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..47b39ce
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,103 @@
+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# The `.rspec` file also contains a few flags that are not defaults but that
+# users commonly want.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
+ # have no way to turn it off -- the option exists only for backwards
+ # compatibility in RSpec 3). It causes shared context metadata to be
+ # inherited by the metadata hash of host groups and examples, rather than
+ # triggering implicit auto-inclusion in groups with matching metadata.
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # This setting enables warnings. It's recommended, but in some cases may
+ # be too noisy due to issues in dependencies.
+ config.warnings = true
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = 'doc'
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end
diff --git a/stores/events.rb b/stores/events.rb
deleted file mode 100644
index 7a48d2c..0000000
--- a/stores/events.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require 'json'
-require 'date'
-require 'open-uri'
-
-class Events
- def self.to_h
- data.map do |hash|
- {
- "Name": "#{hash['name']}",
- "Date": "#{date_format(hash['time'])}",
- "Attendee Limit": "#{hash['rsvp_limit']}",
- "Attended": "#{hash['yes_rsvp_count']}",
- "Link": "#{hash['link']}"
- }
- end
- end
-
- def self.data
- uri = 'https://api.meetup.com/NYC-rb/events?status=past'
-
- @data ||= JSON.parse(open(uri).read)
- end
-
- def self.date_format(time)
- Time.at(( time / 1_000 )).strftime '%Y-%m-%d'
- end
-end