mm-blog 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ gem "toto"
7
+ gem "sinatra"
8
+ gem "pony"
9
+
10
+ # Add dependencies to develop your gem here.
11
+ # Include everything needed to run rake, tests, features, etc.
12
+ group :development do
13
+ gem "shoulda", ">= 0"
14
+ gem "bundler", "~> 1.0.0"
15
+ gem "jeweler", "~> 1.5.2"
16
+ gem "rcov", ">= 0"
17
+ end
@@ -0,0 +1,47 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.0.5)
5
+ builder (3.0.0)
6
+ git (1.2.5)
7
+ i18n (0.5.0)
8
+ jeweler (1.5.2)
9
+ bundler (~> 1.0.0)
10
+ git (>= 1.2.5)
11
+ rake
12
+ mail (2.2.15)
13
+ activesupport (>= 2.3.6)
14
+ i18n (>= 0.4.0)
15
+ mime-types (~> 1.16)
16
+ treetop (~> 1.4.8)
17
+ mime-types (1.16)
18
+ polyglot (0.3.1)
19
+ pony (1.1)
20
+ mail (> 2.0)
21
+ rack (1.2.2)
22
+ rake (0.8.7)
23
+ rcov (0.9.9)
24
+ rdiscount (1.6.8)
25
+ shoulda (2.11.3)
26
+ sinatra (1.2.0)
27
+ rack (~> 1.1)
28
+ tilt (< 2.0, >= 1.2.2)
29
+ tilt (1.2.2)
30
+ toto (0.4.9)
31
+ builder
32
+ rack
33
+ rdiscount
34
+ treetop (1.4.9)
35
+ polyglot (>= 0.3.1)
36
+
37
+ PLATFORMS
38
+ ruby
39
+
40
+ DEPENDENCIES
41
+ bundler (~> 1.0.0)
42
+ jeweler (~> 1.5.2)
43
+ pony
44
+ rcov
45
+ shoulda
46
+ sinatra
47
+ toto
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2011 Mark McConachie
2
+
3
+ You can use this if I told you that you can :)
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2011 Mark McConachie. See LICENSE.txt for
2
+ further details.
3
+
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "mm-blog"
16
+ gem.homepage = "http://www.markmcconachie.com"
17
+ gem.license = "Custom"
18
+ gem.summary = "A simple wee blog platform"
19
+ gem.description = "A simple wee blog platform"
20
+ gem.email = "mark@markmcconachie.com"
21
+ gem.authors = ["Mark McConachie"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ gem.add_runtime_dependency 'toto'
26
+ gem.add_runtime_dependency 'sinatra'
27
+ gem.add_runtime_dependency 'pony'
28
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
29
+ end
30
+ Jeweler::RubygemsDotOrgTasks.new
31
+
32
+ require 'rake/testtask'
33
+ Rake::TestTask.new(:test) do |test|
34
+ test.libs << 'lib' << 'test'
35
+ test.pattern = 'test/**/test_*.rb'
36
+ test.verbose = true
37
+ end
38
+
39
+ require 'rcov/rcovtask'
40
+ Rcov::RcovTask.new do |test|
41
+ test.libs << 'test'
42
+ test.pattern = 'test/**/test_*.rb'
43
+ test.verbose = true
44
+ end
45
+
46
+ task :default => :test
47
+
48
+ require 'rake/rdoctask'
49
+ Rake::RDocTask.new do |rdoc|
50
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "mm-blog #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.1
@@ -0,0 +1,64 @@
1
+ require "toto"
2
+ require "sinatra"
3
+ require 'pony'
4
+
5
+ module MMBlog
6
+
7
+ module Application
8
+
9
+ @config = {}
10
+
11
+ def self.config= (_config)
12
+ @config = _config
13
+ end
14
+
15
+ def self.config
16
+ @config
17
+ end
18
+
19
+ def self.toto
20
+ Toto::Server.new do
21
+ #
22
+ # Add your settings here
23
+ # set [:setting], [value]
24
+ #
25
+ set :author, MMBlog::Application.config[:author]
26
+ set :title, MMBlog::Application.config[:title]
27
+ set :root, "home"
28
+ set :disqus, MMBlog::Application.config[:disqus]
29
+ set :date, lambda {|now| now.strftime("%B #{now.day.ordinal} %Y") }
30
+ end
31
+ end
32
+
33
+ class ContactForm < Sinatra::Base
34
+ get '/contact' do
35
+ erb :contact, :layout => :'../templates/layout'
36
+ end
37
+
38
+ get '/success' do
39
+ erb :success, :layout => :'../templates/layout'
40
+ end
41
+
42
+ post '/contact' do
43
+ Pony.mail(
44
+ :from => MMBlog::Application.config[:email_from],
45
+ :to => MMBlog::Application.config[:email_to],
46
+ :subject => params[:name] + "<" + params[:email] + ">" + " has contacted you",
47
+ :body => params[:message],
48
+ :port => '587',
49
+ :via => :smtp,
50
+ :via_options => {
51
+ :address => 'smtp.gmail.com',
52
+ :port => '587',
53
+ :enable_starttls_auto => true,
54
+ :user_name => MMBlog::Application.config[:gmail_username],
55
+ :password => MMBlog::Application.config[:gmail_password],
56
+ :authentication => :plain,
57
+ :domain => 'localhost.localdomain'
58
+ })
59
+ redirect '/success'
60
+ end
61
+ end
62
+
63
+ end
64
+ end
@@ -0,0 +1,81 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{mm-blog}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Mark McConachie"]
12
+ s.date = %q{2011-03-15}
13
+ s.description = %q{A simple wee blog platform}
14
+ s.email = %q{mark@markmcconachie.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".DS_Store",
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/mm-blog.rb",
29
+ "test/helper.rb",
30
+ "test/test_mm-blog.rb"
31
+ ]
32
+ s.homepage = %q{http://www.markmcconachie.com}
33
+ s.licenses = ["Custom"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.6.2}
36
+ s.summary = %q{A simple wee blog platform}
37
+ s.test_files = [
38
+ "test/helper.rb",
39
+ "test/test_mm-blog.rb"
40
+ ]
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<toto>, [">= 0"])
47
+ s.add_runtime_dependency(%q<sinatra>, [">= 0"])
48
+ s.add_runtime_dependency(%q<pony>, [">= 0"])
49
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
50
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
52
+ s.add_development_dependency(%q<rcov>, [">= 0"])
53
+ s.add_runtime_dependency(%q<toto>, [">= 0"])
54
+ s.add_runtime_dependency(%q<sinatra>, [">= 0"])
55
+ s.add_runtime_dependency(%q<pony>, [">= 0"])
56
+ else
57
+ s.add_dependency(%q<toto>, [">= 0"])
58
+ s.add_dependency(%q<sinatra>, [">= 0"])
59
+ s.add_dependency(%q<pony>, [">= 0"])
60
+ s.add_dependency(%q<shoulda>, [">= 0"])
61
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
62
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
63
+ s.add_dependency(%q<rcov>, [">= 0"])
64
+ s.add_dependency(%q<toto>, [">= 0"])
65
+ s.add_dependency(%q<sinatra>, [">= 0"])
66
+ s.add_dependency(%q<pony>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<toto>, [">= 0"])
70
+ s.add_dependency(%q<sinatra>, [">= 0"])
71
+ s.add_dependency(%q<pony>, [">= 0"])
72
+ s.add_dependency(%q<shoulda>, [">= 0"])
73
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
74
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
75
+ s.add_dependency(%q<rcov>, [">= 0"])
76
+ s.add_dependency(%q<toto>, [">= 0"])
77
+ s.add_dependency(%q<sinatra>, [">= 0"])
78
+ s.add_dependency(%q<pony>, [">= 0"])
79
+ end
80
+ end
81
+
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'mm-blog'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestMmBlog < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mm-blog
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mark McConachie
@@ -129,10 +129,22 @@ executables: []
129
129
 
130
130
  extensions: []
131
131
 
132
- extra_rdoc_files: []
133
-
134
- files: []
135
-
132
+ extra_rdoc_files:
133
+ - LICENSE.txt
134
+ - README.rdoc
135
+ files:
136
+ - .DS_Store
137
+ - .document
138
+ - Gemfile
139
+ - Gemfile.lock
140
+ - LICENSE.txt
141
+ - README.rdoc
142
+ - Rakefile
143
+ - VERSION
144
+ - lib/mm-blog.rb
145
+ - mm-blog.gemspec
146
+ - test/helper.rb
147
+ - test/test_mm-blog.rb
136
148
  has_rdoc: true
137
149
  homepage: http://www.markmcconachie.com
138
150
  licenses:
@@ -147,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
159
  requirements:
148
160
  - - ">="
149
161
  - !ruby/object:Gem::Version
150
- hash: -2983203326656726018
162
+ hash: -4129912209497609234
151
163
  segments:
152
164
  - 0
153
165
  version: "0"
@@ -164,5 +176,6 @@ rubygems_version: 1.6.2
164
176
  signing_key:
165
177
  specification_version: 3
166
178
  summary: A simple wee blog platform
167
- test_files: []
168
-
179
+ test_files:
180
+ - test/helper.rb
181
+ - test/test_mm-blog.rb