paid_up 0.5.3 → 0.6.0

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.
@@ -2,13 +2,13 @@ class CreatePaidUpPlansTable < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :paid_up_plans do |t|
4
4
  t.string :stripe_id
5
- t.string :name
5
+ t.string :title
6
6
  t.text :description
7
7
  t.integer :sort_order
8
8
 
9
9
  t.timestamps
10
10
  end
11
- add_index :paid_up_plans, :name, :unique => true
11
+ add_index :paid_up_plans, :title, :unique => true
12
12
  add_index :paid_up_plans, :stripe_id, :unique => true
13
13
  end
14
14
  end
data/paid_up.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: paid_up 0.5.3 ruby lib
5
+ # stub: paid_up 0.6.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "paid_up"
9
- s.version = "0.5.3"
9
+ s.version = "0.6.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Karen Lundgren"]
14
- s.date = "2015-05-26"
14
+ s.date = "2015-05-27"
15
15
  s.description = "Allows a model of your choosing (such as users) to subscribe to a plan, which enables features."
16
16
  s.email = "karen.e.lundgren@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -93,6 +93,10 @@ Gem::Specification.new do |s|
93
93
  "spec/dummy/app/models/user.rb",
94
94
  "spec/dummy/app/views/layouts/application.html.haml",
95
95
  "spec/dummy/app/views/pages/index.html.haml",
96
+ "spec/dummy/bin/bundle",
97
+ "spec/dummy/bin/rails",
98
+ "spec/dummy/bin/rake",
99
+ "spec/dummy/bin/setup",
96
100
  "spec/dummy/config.ru",
97
101
  "spec/dummy/config/application.rb",
98
102
  "spec/dummy/config/boot.rb",
@@ -82,7 +82,7 @@ RSpec.describe PaidUp::SubscriptionsController do
82
82
  end
83
83
  context "sets a flash message" do
84
84
  subject { flash[:notice] }
85
- it { should match /You are now subscribed to the #{free_plan.name} Plan/ }
85
+ it { should match /You are now subscribed to the #{free_plan.title} Plan/ }
86
86
  end
87
87
  end
88
88
  context 'when downgrading' do
@@ -98,7 +98,7 @@ RSpec.describe PaidUp::SubscriptionsController do
98
98
  end
99
99
  context "sets a flash message" do
100
100
  subject { flash[:notice] }
101
- it { should match /You are now subscribed to the #{no_ads_plan.name} Plan/ }
101
+ it { should match /You are now subscribed to the #{no_ads_plan.title} Plan/ }
102
102
  end
103
103
  end
104
104
  end
@@ -132,7 +132,7 @@ RSpec.describe PaidUp::SubscriptionsController do
132
132
  end
133
133
  context "sets a flash message" do
134
134
  subject { flash[:notice] }
135
- it { should match /You are now subscribed to the #{professional_plan.name} Plan/ }
135
+ it { should match /You are now subscribed to the #{professional_plan.title} Plan/ }
136
136
  end
137
137
  end
138
138
 
@@ -149,7 +149,7 @@ RSpec.describe PaidUp::SubscriptionsController do
149
149
  end
150
150
  context "sets a flash message" do
151
151
  subject { flash[:notice] }
152
- it { should match /You are now subscribed to the #{professional_plan.name} Plan/ }
152
+ it { should match /You are now subscribed to the #{professional_plan.title} Plan/ }
153
153
  end
154
154
  end
155
155
  end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  # Pick the frameworks you want:
4
4
  require "active_record/railtie"
5
5
  require "action_controller/railtie"
6
- require "action_mailer/railtie"
6
+ # require "action_mailer/railtie"
7
7
  require "action_view/railtie"
8
8
  require "sprockets/railtie"
9
9
 
Binary file
@@ -3,13 +3,13 @@ class CreatePaidUpPlansTable < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :paid_up_plans do |t|
5
5
  t.string :stripe_id
6
- t.string :name
6
+ t.string :title
7
7
  t.text :description
8
8
  t.integer :sort_order
9
9
 
10
10
  t.timestamps
11
11
  end
12
- add_index :paid_up_plans, :name, :unique => true
12
+ add_index :paid_up_plans, :title, :unique => true
13
13
  add_index :paid_up_plans, :stripe_id, :unique => true
14
14
  end
15
15
  end
@@ -39,15 +39,15 @@ ActiveRecord::Schema.define(version: 20150523010840) do
39
39
 
40
40
  create_table "paid_up_plans", force: :cascade do |t|
41
41
  t.string "stripe_id"
42
- t.string "name"
42
+ t.string "title"
43
43
  t.text "description"
44
44
  t.integer "sort_order"
45
45
  t.datetime "created_at"
46
46
  t.datetime "updated_at"
47
47
  end
48
48
 
49
- add_index "paid_up_plans", ["name"], name: "index_paid_up_plans_on_name", unique: true
50
49
  add_index "paid_up_plans", ["stripe_id"], name: "index_paid_up_plans_on_stripe_id", unique: true
50
+ add_index "paid_up_plans", ["title"], name: "index_paid_up_plans_on_title", unique: true
51
51
 
52
52
  create_table "roles", force: :cascade do |t|
53
53
  t.string "name"
@@ -13,7 +13,7 @@ Stripe::Plan.find_or_create_by_id(
13
13
  }
14
14
  )
15
15
  anonymous = PaidUp::Plan.create(
16
- name: 'Anonymous',
16
+ title: 'Anonymous',
17
17
  stripe_id: 'anonymous-plan',
18
18
  description: "What you can do without logging in.",
19
19
  sort_order: -1
@@ -29,7 +29,7 @@ Stripe::Plan.find_or_create_by_id(
29
29
  }
30
30
  )
31
31
  free = PaidUp::Plan.create(
32
- name: 'Free',
32
+ title: 'Free',
33
33
  stripe_id: 'free-plan',
34
34
  description: "Can't beat the price!",
35
35
  sort_order: 0
@@ -45,7 +45,7 @@ Stripe::Plan.find_or_create_by_id(
45
45
  }
46
46
  )
47
47
  no_ads = PaidUp::Plan.create(
48
- name: 'No Ads',
48
+ title: 'No Ads',
49
49
  stripe_id: 'no-ads-plan',
50
50
  description: "No frills, just removes the ads.",
51
51
  sort_order: 1
@@ -61,7 +61,7 @@ Stripe::Plan.find_or_create_by_id(
61
61
  }
62
62
  )
63
63
  group_leader = PaidUp::Plan.create(
64
- name: 'Group Leader',
64
+ title: 'Group Leader',
65
65
  stripe_id: 'group-leader-plan',
66
66
  description: "For leaders of single groups, with configuration.",
67
67
  sort_order: 2
@@ -77,7 +77,7 @@ Stripe::Plan.find_or_create_by_id(
77
77
  }
78
78
  )
79
79
  professional = PaidUp::Plan.create(
80
- name: 'Professional',
80
+ title: 'Professional',
81
81
  stripe_id: 'professional-plan',
82
82
  description: "Designed for professionals with unlimited groups, a calendar and configuration.",
83
83
  sort_order: 3
Binary file