Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【園木】料金シミュレーションAPIの開発 #37

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
aee4829
apiを新規立ち上げ
ysk91 Mar 30, 2023
afe70ce
costs_controllerを作成
ysk91 Mar 30, 2023
3fe4056
indexページでjsonを返す
ysk91 Mar 30, 2023
1b95b10
calculate_rateアクションを作成
ysk91 Mar 30, 2023
6e7ce0f
出力を配列で返せるようにした
ysk91 Mar 31, 2023
3c4de07
使用量別に計算可能
ysk91 Mar 31, 2023
798e0c5
存在しない契約アンペアの処理を追加
ysk91 Apr 4, 2023
2777733
RSpecの初期設定
ysk91 Apr 4, 2023
e4af252
calculate_rateアクションのテストを作成
ysk91 Apr 4, 2023
94c6c2a
indexアクションのRSpecを作成
ysk91 Apr 4, 2023
283be08
yamlデータを修正
ysk91 Apr 4, 2023
aab3300
入力画面を作成
ysk91 Apr 6, 2023
c03bdbc
出力画面を作成
ysk91 Apr 6, 2023
a0f368f
API呼び出し用に環境変数を設定
ysk91 Apr 8, 2023
ef1e167
Update README.md
ysk91 Apr 8, 2023
e6392c0
本番環境に向けて修正
ysk91 Apr 10, 2023
f4e43cf
yournameディレクトリ名を変更
ysk91 Apr 11, 2023
346c0b8
Merge pull request #1 from ysk91/sonoki
ysk91 Apr 11, 2023
8d58403
renderにアップロード用に設定
ysk91 Apr 11, 2023
d31c565
rake assetsをコメントアウト
ysk91 Apr 11, 2023
2382ffa
rootパスを設定
ysk91 Apr 11, 2023
1cce842
outputアクションでhttpsリクエストを送るように設定
ysk91 Apr 11, 2023
8409617
Update README.md
ysk91 Apr 11, 2023
ca78969
Update README.md
ysk91 Apr 11, 2023
1cef839
webpackerをインストール
ysk91 Apr 11, 2023
8deab3c
計算ロジックテストを追加
ysk91 Apr 11, 2023
c80a8db
api計算テストを追加
ysk91 Apr 11, 2023
7913bdf
簡単なミスを修正
ysk91 Apr 17, 2023
29d409f
中度のレビューに対応
ysk91 Apr 17, 2023
8897705
Delete enechange_challenge_keypair.pem
ysk91 Apr 17, 2023
34df231
differenceのタイポを修正
ysk91 Apr 17, 2023
03973bc
計算ロジックを修正
ysk91 Apr 18, 2023
3311907
key.to_s問題を解決
ysk91 Apr 19, 2023
faaea65
usageがzeroのとき値を返す
ysk91 Apr 20, 2023
9fad181
usage=0のテスト作成
ysk91 Apr 20, 2023
9286a10
yaml_dataをメモ化
ysk91 Apr 22, 2023
0121ded
Merge pull request #2 from ysk91/review
ysk91 Apr 22, 2023
a6a1031
計算ロジックをモデルに移動
ysk91 Apr 23, 2023
9b03c9f
契約アンペアのバリデーション追加
ysk91 Apr 23, 2023
a322123
UIでエラーを返す
ysk91 Apr 23, 2023
c673ff9
Modelでyamldataを読み込み
ysk91 Apr 23, 2023
dee4e2e
cost_spec作成
ysk91 Apr 23, 2023
e91353d
Merge pull request #3 from ysk91/cost_model
ysk91 May 9, 2023
35d5eec
レビューコメント
ysk91 May 9, 2023
447b728
Merge pull request #4 from ysk91/cost_model
ysk91 May 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
Binary file added serverside_challenge_1/.DS_Store
Binary file not shown.
Binary file added serverside_challenge_1/challenges/.DS_Store
Binary file not shown.
10 changes: 10 additions & 0 deletions serverside_challenge_1/challenges/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark the yarn lockfile as having been generated.
yarn.lock linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
33 changes: 33 additions & 0 deletions serverside_challenge_1/challenges/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key
1 change: 1 addition & 0 deletions serverside_challenge_1/challenges/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.2
1 change: 1 addition & 0 deletions serverside_challenge_1/challenges/sonoki/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
Empty file.
1 change: 1 addition & 0 deletions serverside_challenge_1/challenges/sonoki/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_URI = "http://localhost:3000"
Empty file.
8 changes: 8 additions & 0 deletions serverside_challenge_1/challenges/sonoki/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated


# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
42 changes: 42 additions & 0 deletions serverside_challenge_1/challenges/sonoki/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

# AWS用キーペア
enechange_challenge_keypair.pem

.env
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
2 changes: 2 additions & 0 deletions serverside_challenge_1/challenges/sonoki/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--require spec_helper
--format documentation
1 change: 1 addition & 0 deletions serverside_challenge_1/challenges/sonoki/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.2
51 changes: 51 additions & 0 deletions serverside_challenge_1/challenges/sonoki/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.7', '>= 6.1.7.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'

gem 'webpacker', '~> 5.0'

gem 'dotenv-rails'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'pry-byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'faker'
end

group :development do
gem 'listen', '~> 3.3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end

group :test do
gem 'capybara', '>= 2.15'
gem 'rspec-rails'
gem "factory_bot_rails"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Loading